Option to upload a file- as it is possible to upload a photo - Forum - Mobile - Progress Community

Option to upload a file- as it is possible to upload a photo

 Forum

Option to upload a file- as it is possible to upload a photo

This question is not answered

When I call the function getPhotoLibrary:

getPhotoLibrary: function (e) {
                navigator.camera.getPicture(
                 uploadPhoto,
                 function (message) {
                     alert("Failed to get a picture. Please select one.");
                 }, {
                     quality: 20,
                     destinationType: navigator.camera.DestinationType.FILE_URI,
                     sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY
                 });
            },

The gallery of the photos in my phone is opened and I can choose a photo.

I want to be able to see also the files in my phone- and to be able to choose a file!

How can I do it?

Thanks a lot!

Shira

All Replies
  • Hello Shira,

    Here is a suggestion.

    The HTML5 File, FileReader and FileList APIs seem to be supported on most web browsers and as such web containers.

    See the following links for info and examples:

    caniuse.com/

    www.html5rocks.com/.../

    demos.telerik.com/.../index

    These API seem to work fine from a web browser. I have not tried them from a mobile app.

    There may be a Cordova FileTransfer API and or a plug-in but perhaps the HTML5 support is sufficient.

    I hope this helps.

    Edsel

  • I think you should take a look here:

    github.com/.../cordova-plugin-file

    and here:

    cordova.apache.org/.../index.html

  • I looked and tried to use this demo: demos.telerik.com/.../index

    I got the option of uploading a file too, and not just a photo,

    But Now if I want to save that file in rollbase,

    How do I do it?

    Thanks a lot!!