16
Views
6
Comments
[Now Plugin File Manager] backgroundDownload undefined
Question
now-plugin-file-manager
Web icon
Forge asset by Mobility Experts
Hi Mobile Experts,

we are trying to implement the webblock DownloadFile but is encountering problem with backgroundDownload  property.

the exact error in console is " Uncaught TypeError: Cannot read property 'backgroundDownload' of undefined"
, and when navigating through DownloadFile.js, the line which contain the error is this line "cordova.plugins.backgroundDownload.backgroundDownload(url, targetFile, Success, Fail, Progress); " inside function MuxMobile_DownloadFile(RuntimeId, url, targetFile, fileName).

double checked config.xml and backgroundDownload plugin is listed, also checked using cordova CLI and it showed that backgroundDownload is installed in the package.  

No Idea why project still does not detect cordova plugin backgrounddownload

Regards,
Lawrence
2020-08-05 08-52-58
Ruben Goncalves
Hi Lawrence,

In order to use this functionality, you need to customize OutSystems Now and add that cordova plugin.
You can see in this post that has a video, how to do it to iOS.

Let me know if this helps you.
Cheers,
RG
UserImage.jpg
Lawrence
Hi Rúben,

we are doing it using Outsystems Now v1.1.12 in android (sent some screenshots).  The plugin is correctly installed in the Project Folder using Cordova CLI.  Not sure why the property of backgrounddownload is still missing after cordova plugin add command.

thanks
lawrence

Cordova Plugins in the Prject folder
 
Error Log

UserImage.jpg
Vitor Oliveira
Hi Lawrence,

I tested from our side and aparently this is a issue on the 
DownloadFile webblock. We will working on it and let you know as soon as possible.

Thanks,
Vitor

UserImage.jpg
Vitor Oliveira
Hi Lawrence, 

It was released a new version of File Manager in forge that should resolve your problem.


Let me know if this helps you.

Thanks,
Vitor

UserImage.jpg
Lawrence
Hi Vitor,

thanks for the fix!

hope you could also assist in new error message in the DownloadFile.js under function fail(message).  in the webblock of DownloadFile, I left the TargetFile blank (""), how should i point the targetfile in Android/iOS to the external storage?

thanks!
lawrence


UserImage.jpg
Vitor Oliveira
Hi Lawrence,

You can use the File Plugin, that is already installed with OutSystems Now, to get the File Path that you will use in the target file input.

Thanks,
Vitor


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.