I'm trying to reproduce your issue but I think that you should provide more information.
I've tried the setup below and the file named Νικόλαος Βέργος.pdf
is correctly returned by /redirect/
.
app.py
from flask import render_template
from flask import Flask
from flask import request, send_from_directory
app = Flask(__name__)
@app.route('/')
def home():
filename='Νικόλαος Βέργος.pdf'
return render_template('home.html', filename=filename)
@app.route('/redirect/')
def redirect():
if request.args:
filename = request.args.get('filename')
filepath = '/static/files/'
return send_from_directory(filepath, filename, as_attachment=True)
templates/home.html
title