Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File saved with wrong extension if there's a query string in the URL #16

Open
icopp opened this issue Aug 9, 2016 · 0 comments
Open

Comments

@icopp
Copy link

icopp commented Aug 9, 2016

In hash mode, caching a Vimeo video with an access token results in a .txt file instead of a .mp4 file. This is with a URL like (for example): https://player.vimeo.com/external/#####.sd.mp4?s=12345abcdef&profile_id=###

The video itself looks like it's saved perfectly fine. Pulling it from a simulator and renaming it from #####.txt to #####.mp4 results in a video file that plays without problems. The problem is only with the wrong file name, since this messes with other plugin usage (for example, supplying the file:// URL to cordova-plugin-streaming-media).

It looks like the problem is that the plugin is just categorically replacing extensions with .txt if there's a query string in the URL. I've made a pull request, #17, that fixes the problem.

@icopp icopp changed the title File saved with wrong extension if file provider uses redirects with wrong Content-Type File saved with wrong extension if there's a query string in the URL Aug 11, 2016
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

No branches or pull requests

1 participant