apache / cordova-plugin-file-transfer

Apache Cordova File Transfer Plugin
https://cordova.apache.org/
Apache License 2.0
596 stars 887 forks source link

Allow to pass an ArrayBuffer to the upload function when working in the browser. #128

Closed danhper closed 8 years ago

danhper commented 8 years ago

Hi,

I have been working with this plugin to create an app compatible with both mobile and browsers, and missed the possibility to simply pass the content of the file to upload when working in the browser.

When uploading from Android/iOS, it is easy enough to work directly with the full path, but in the browser I think it easier to just use a normal image input and read its content.

I did try to pass a data URL instead of a path, but it did not seem to work in the browser, and I got a FIlE_NOT_FOUND_ERR. Did I miss something here?

As the filePath was transformed to an ArrayBuffer, I thought that accepting an ArrayBuffer instead of a path could be a good solution.

What do you think?

Thank you for your help!

cordova-qa commented 8 years ago

Cordova CI Build has one or more failures.

Commit - Link Dashboard - Link

Builder Name Console Output Test Report Device Logs
Windows 8.1 Store Link Link Link
Windows 8.1 Phone Link Link Link
iOS Link Link Link
Android Mac Link Link Link