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

iOS 13 file input does not upload video from library #351

Closed
marensas opened this issue Oct 9, 2019 · 4 comments
Closed

iOS 13 file input does not upload video from library #351

marensas opened this issue Oct 9, 2019 · 4 comments

Comments

@marensas
Copy link

marensas commented Oct 9, 2019

Problem

iOS 13 file input does not upload video from library

Description

strangely accepting video from library. The file size is 0, parsing crashes. Direct video filming/uploading works ok. Photos direct/library are ok. Same project code from safari browser works ok.

When debugging APP in safari, I can edit HTML and add pure <input type="file" />, upload video from library, console input by command document.getElementById(123).files and see that fileSize: 0.

Environment, Platform, Device

IOS 13 ( or 13.1.2 ) Iphone X ( any ). Latest plugin versions.

@sutineeangs
Copy link

same problem

@ejlocop
Copy link

ejlocop commented Dec 4, 2019

Hello, I experienced the same problem but I was able to nailed down what the issue was.
You must have a permission to acccess the library first before you can upload the video file to your server.

@sutineeangs
Copy link

Hello, I experienced the same problem but I was able to nailed down what the issue was.
You must have a permission to acccess the library first before you can upload the video file to your server.
@ejlocop
Thank you.
I fixed it using cordova-plugin-photo-library and called cordova.plugins.photoLibrary.requestAuthorization().

@marensas
Copy link
Author

I granted permissions with cordova.plugins.diagnostic plugin:

https://github.com/dpa99c/cordova-diagnostic-plugin#getcamerarollauthorizationstatus
https://github.com/dpa99c/cordova-diagnostic-plugin#requestcamerarollauthorization

Closing.

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

3 participants