How to upload from assets-library
Opened this issue · 6 comments
kinhunt commented
It gives me file not found error
DylanVann commented
Any news on this?
fov42550564 commented
wirte a plugin copy assets from sdcard, then upload
DylanVann commented
This is an iOS issue. With photos and videos you'll get an asset path instead of a real path. When this module tries to get NSData from that it fails.
I fixed it, will submit a PR.
fov42550564 commented
on ios, you can use Documents dir
DylanVann commented
We get a uri like this on iOS assets-library://asset/asset.JPG?id=575ABD7C-3DDD-47E6-AD12-F4918D7B211F&ext=JPG
. Trying to transfer that file causes an error. What we want is to get NSData from that uri and send it, we don't want to have to copy the file to the documents directory first. I've implemented this, but it isn't as clean as it could be. I'll send a PR on the weekend.