Skip to content

Quick Fix: Multiple file download not working#2169

Merged
dawoodkhan82 merged 7 commits into
mainfrom
dawood/2510
Sep 7, 2022
Merged

Quick Fix: Multiple file download not working#2169
dawoodkhan82 merged 7 commits into
mainfrom
dawood/2510

Conversation

@dawoodkhan82
Copy link
Copy Markdown
Collaborator

@dawoodkhan82 dawoodkhan82 commented Sep 2, 2022

Description

Download button was not working for file output component.

Screen.Recording.2022-09-02.at.5.46.03.PM.mov

Please include:

  • relevant motivation
  • a summary of the change
  • which issue is fixed.
  • any additional dependencies that are required for this change.

Closes: #2150

Checklist:

  • I have performed a self-review of my own code
  • My code follows the style guidelines of this project
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@dawoodkhan82 dawoodkhan82 linked an issue Sep 2, 2022 that may be closed by this pull request
1 task
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 2, 2022

All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-2169-all-demos

@abidlabs
Copy link
Copy Markdown
Member

abidlabs commented Sep 6, 2022

This isn't working for me. I tried running the following code:

import gradio as gr


def a(img):
    return ["lion.jpg", "cantina.wav"]


with gr.Blocks() as demo:
    with gr.Row():
        with gr.Column():
            with gr.Row():
                input_img = gr.File()
            with gr.Row():
                btn = gr.Button(value="submit")
        with gr.Column():
            with gr.Row():
                output_img = gr.File()

    btn.click(fn=a, inputs=[input_img], outputs=[output_img])

demo.launch(inbrowser=True)

(Files attached to this comment)

I get the mouse change when I hover over download, but I'm unable to download them when I click on them:

image

@abidlabs
Copy link
Copy Markdown
Member

abidlabs commented Sep 6, 2022

FIle here: lion

@abidlabs
Copy link
Copy Markdown
Member

abidlabs commented Sep 7, 2022

Is this ready to be reviewed again @dawoodkhan82?

@dawoodkhan82
Copy link
Copy Markdown
Collaborator Author

Is this ready to be reviewed again @dawoodkhan82?

yup, should be fixed now

Copy link
Copy Markdown
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for me @dawoodkhan82 ! @abidlabs May be worth trying again?

@abidlabs
Copy link
Copy Markdown
Member

abidlabs commented Sep 7, 2022

LGTM as well, thanks for making the fix @dawoodkhan82!

@dawoodkhan82 dawoodkhan82 merged commit 83b2953 into main Sep 7, 2022
@dawoodkhan82 dawoodkhan82 deleted the dawood/2510 branch September 7, 2022 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple file download not working

3 participants