Page MenuHomePhabricator

Download button redirects the new generated video instead of downloading.
Open, Needs TriagePublic

Description

The download button redirects the newly generated (cropped, trimmed, rotated) video instead of popping up the download dialog box.

Tested in Mozilla and Google Chrome.

Repos:
VideoCutTool-front-end: https://github.com/gopavasanth/video-cut-tool-front-end/
VideoCutTool-back-end: https://github.com/gopavasanth/video-cut-tool-back-end/

The download button code is here: https://github.com/gopavasanth/video-cut-tool-front-end/blob/master/src/components/home.js#L997

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 9 2019, 7:08 AM
Nikitrain added a subscriber: Nikitrain.EditedOct 3 2019, 7:20 AM

hi! I would like to work on this task. Can you also post some screenshots of the problem or maybe some link where I can see the issue?

Aklapper added a comment.EditedOct 3 2019, 6:58 PM

@Nikitrain: See the VideoCutTool project tag on the right and click it to get to https://phabricator.wikimedia.org/project/profile/4054/ - why screenshots? :)

Thanks, @Nikitrain for showing your interest to work on this task.

Steps to reproduce this:

On clicking this Download button, the newly generated video is redirecting and playing in the browsers Instead of actually downloading.

Also, if you are working on this task, Please assign yourself to this task.

Nikitrain claimed this task.Oct 4 2019, 9:19 PM
Nikitrain removed Nikitrain as the assignee of this task.Oct 4 2019, 9:22 PM
Nikitrain claimed this task.

Hey @Gopavasanth need a little guidance here I am unable to figure out what's causing the button to misbehave can you maybe guide me where should I look

Gopavasanth added a comment.EditedOct 9 2019, 3:08 PM

Hi @Nikitrain, did you reproduce the bug locally? Are you able to see the "Download" button? If yes probably the code might have to change somewhere here.

Also, see here this works fine to download the videos but the same code is not working for us in VideoCutTool.

hope you got it :)

Hi @Nikitrain, did you reproduce the bug locally?

I tried to, by downloading the "video-cut-tool-front-end" repository and running npm install and npm start command but it doesn't show anything other than a favicon and VedioCutTool in the tab. What might I be doing wrong?

Gopavasanth added a comment.EditedOct 12 2019, 9:51 AM

Hi @Nikitrain, did you reproduce the bug locally?

I tried to, by downloading the "video-cut-tool-front-end" repository and running npm install and npm start command but it doesn't show anything other than a favicon and VedioCutTool in the tab. What might I be doing wrong?

To run VideoCutTool locally see this.

In src/App.js change <Route exact path="/video-cut-tool-front-end/" component={home} /> to <Route exact path="/" component={home} />

Nikitrain added a comment.EditedOct 14 2019, 4:45 AM

@Gopavasanth I think the problem in the link is the same as in this question https://stackoverflow.com/questions/50694881/how-to-download-file-in-react-js and thus can't be resolved by changing code in the front end, what do you think?

@Gopavasanth the new tab which contains the newly generated video also have the download option in the player. Also, the file can be downloaded directly from the download button by right-clicking on it and choosing the save link as option. I couldn't find any way to resolve it through front end.

@Gopavasanth the new tab which contains the newly generated video also has the download option in the player. Also, the file can be downloaded directly from the download button by right-clicking on it and choosing the save link as option. I couldn't find any way to resolve it through the front end.

Yes, users can download the video in this way but, Making this download button into working might help the users a lot :)