- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
i´m creating an image gallery with "lightgallery", everything is correct except the download button that do nothing.
I´m trying flietransfer and file plugins but i´m doing something wrong.
I there any easy way to make a button to download images from the gallery i´ve created to the device?
- Tags:
- HTML5
- Intel® XDK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
David,
I am using File Transfer with success. See my code:
var ft = new FileTransfer(); var options = new FileUploadOptions(); var headers={'Authorization':'authHeader'}; ft.download( uri, fileURL + CNome, function(entry) { //CNome is the name of my file $("#imgImagemEvento").attr("src", entry.toURL() + "/" & CNome ); $('#divImagemEvento').show(); }, function(error) { alert("download error source " + error.source); alert("download error target " + error.target); alert("upload error code" + error.code); }, true, options );
Try it.
Hamilton
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
David,
I am using File Transfer with success. See my code:
var ft = new FileTransfer(); var options = new FileUploadOptions(); var headers={'Authorization':'authHeader'}; ft.download( uri, fileURL + CNome, function(entry) { //CNome is the name of my file $("#imgImagemEvento").attr("src", entry.toURL() + "/" & CNome ); $('#divImagemEvento').show(); }, function(error) { alert("download error source " + error.source); alert("download error target " + error.target); alert("upload error code" + error.code); }, true, options );
Try it.
Hamilton
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Hamilton,
Thanks a lot for your help :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
David> yes, the CNome is my variable with the file name. You can use any name to this variable or even put the name directly ( + "/yourFileName")
Hamilton
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Hamilton,
I´m going crazy, i´m not sure what i´m doing wrong.... can i send you my project and check it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
David,
I can try. Send me in private.
Hamilton

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page