cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tuvistavie <...@git.apache.org>
Subject [GitHub] cordova-plugin-file-transfer pull request: Allow to pass an ArrayB...
Date Sat, 27 Feb 2016 12:42:40 GMT
GitHub user tuvistavie opened a pull request:

    https://github.com/apache/cordova-plugin-file-transfer/pull/128

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

    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!

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tuvistavie/cordova-plugin-file-transfer master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-file-transfer/pull/128.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #128
    
----
commit de84761d43509fa732cb36f46200d7b2edd3c048
Author: Daniel Perez <daniel@claudetech.com>
Date:   2016-02-27T11:45:44Z

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

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message