Total noob on ionic / cordova / angular here. It started last week, so I'm scared here. I am trying to download files from an application (on iOS) that was created using Ionic and Cordova. Files are images and therefore very large. I want to load these images into a background workflow. Thus, there is a need for web workers.
Images must be uploaded to Amazon S3. I have the following code in a javascript working file.
onmessage = function(e) {
importScripts("aws-sdk.min.js");
console.log("Doing work");
self.AWS.config.region = 'us-east-1';
self.AWS.config.update({accessKeyId: 'XXX', secretAccessKey: 'ABCD'});
postMessage("DONE");
}
My main javascript file is okay because I tried it with non-AWS configurations (plain old console.log("stuff here"))and it works fine. It starts crashing as soon as I try to do something using the AWS SDK. It is aws-sdk.min.jsimported correctly (at least , Chrome does not show errors on the console).
source
share