Sending files - Python on the web - Learning Flask Series Pt. 14

preview_player
Показать описание
In this episode you'll learn how to send files from a Flask URL, allowing users to download files directly from your application.

More detail in the text based tutorial here -

Рекомендации по теме
Комментарии
Автор

this flask tutoril is best then the all tutoril on the youtube

ArenaAssassinYT
Автор

I’ve been going through each episode one at a time, using your website and going back to each many times over. Thank you! 🙏🙏🙏

nickapeed
Автор

You sir helped me solve my confusion on this flask function. Thank you from a Python newbie! No more school boy errors for me.

joecandoit
Автор

with flask version 2.0 instead of filename you use path
], path=image_file_name ....

dundarylmaz
Автор

Wrapped this into a HTML page with a file list so the user can click on the filename to download it. Awesome.

investmentapps
Автор

what a for anyone newcomers instead of filename parameter for the send_from_directory...its now path

santiagoandresortiz
Автор

Very helpful tutorials on Flask. Thank you

pronoygomes
Автор

For those who get a 404 error and are using Windows, you have to start your working directory with "C:" and remove the leading slash. So in this example it would be app.config["CLIENT_IMAGES"] = C:/wsl/projects/pythonise... etc.

RMdimension
Автор

Need to add a sticky somewhere about filename= is now path=

WillDelish
Автор

A very good video. Thanks for the sharing

ThilinaWimalapriya
Автор

LEGEND, for the ones who have this error "send_from_directory() missing 1 required positional argument: 'path'", replace filename for path in "send_from_directory(app.config['CLIENT_IMAGES'], path=image_name, as_attachment=True)".

berrodriquez
Автор

I really enjoy your series Julian, keep up the good work. I think it would be better to connect a button to the path of the files to get them downloaded. A lot of not so tech guys will be frustrated to type the name of the file they want to download.

adeolaogunleye
Автор

Hello, please is there a tip to check the orientation of an odt file before upload ? That is to say I would like to check is the user select landscape mode in a dropdown list and he tries to send the file which is not in landscape, I will return a validation error

manuponot
Автор

Pretty helpful! Thanks and keep up buddy!

alidaghighi
Автор

I want to send a pdf file from one user to another over my website how can I achieve this?

footballforfun
Автор

Looks like the except part is never triggered, even if you have an error. The send_from_directory seems to handle it.

marc-alexandrepaquet
Автор

Hi,

Can you make video on send files to render inside html like pdf load inside html

naveenbiradar
Автор

isn't it possible to use {{url_for("file")}} here?

AutomationWithSholz
Автор

How to take two excel files from UI, process them and send back a excel with multiple sheets

nikhilmugganawar
Автор

Sir, it is showing me 404 Not Found, what to do?!

varunmanchanda
join shbcf.ru