How to download files with name and extension?
Hello,might be a dumb question but, how can I download an output file with the same name and extension?I’m using gradio Interface and my outputs is just a single file (where I return the file path), the model works correctly but when trying to download my file, in google chrome it changes to a default name “download” without any extension.Am I missing something?Thank you
2022-07-01T21:47:35Z
Hi@AeroDEmi! Thank you for posting this.I think you can right-click ondownloadand then click onSave Link Asand you can chose the location and filename there.image1045×629 58.8 KB
2022-07-01T21:51:37Z
Thank you for your response@freddyaboulton.In the example you provided when I right-click on the download link and choose theSave Link Asit does not automatically download the zip as tmp.zip instead it is download.zip. Is there a way to not manually enter the name each time?
2022-07-01T21:56:50Z
Take for example this implementation:Dpt Depth Estimation + 3D - a Hugging Face Space by radamesIt has 3 outputs, the last one is a file, that downloads with a pre-given name and extension
2022-07-01T22:42:17Z
@AeroDEmiThank you for explaining that. I think I understand the problem now. In the space you linked me, the file is downloaded with the name given by the prediction function by default. That space is running gradio 3.0.b8. The same is true of thezip_two_filesdemo with gradio 3.0.12 but not with the latest gradio version or gradio 3.0.18.This seems like an undesired change. I will file an issue for this. Thank you for posting this!
2022-07-01T22:55:38Z
@AeroDEmiFiledDownload button does not respect the filepath returned by the interpretation function · Issue #1689 · gradio-app/gradio · GitHub
2022-07-01T23:05:49Z
Thank you@freddyaboulton