Hello to everyone. First of all thanks for the amazing uploading library you’re building. I was trying to use the recent AwsS3 plugin but despite many tries, having read the documentation and having run the example (which doesn’t create bundle.js on my system) I still didn’t succeeded.
To test just the upload without having to relay on the backend to generate a signed URL I manually return an object in getUploadParameters() with method, url and fields manually set taking the values from another working upload form we have in the app which uses Jquery File Upload, but I don’t know if the format I use for the values is correct, that’s why I tried to run the example to see what are some expected values (but like I said the server starts but bundle.js is not created).
This is how I configured the plugin:
.use(Uppy.AwsS3, {
getUploadParameters (file) {
return {
method: 'post',
url: 'https://MYBUCKET.s3.eu-central-1.amazonaws.com',
fields: {"key":"uploads/development/5/d4310c35-bc5f-4a9b-acda-bdcf01124669/${filename}","success_action_status":"201","acl":"public-read","policy":"blablaBASE64stuff","x-amz-credential":"AKIAI2OUIBUCMIL6GFZA/20170829/eu-central-1/s3/aws4_request","x-amz-algorithm":"AWS4-HMAC-SHA256","x-amz-date":"20170829T110829Z","x-amz-signature":"f82582a0ec7658b7409a67190f84c3b9f2aaf151a1227e9cd2e187acd27d553c"}
}
}
})
These are the messages from the browser console with debug set to true for Uppy:
LOG: Dashboard width: 765 upload_widget.js:239:11045
Object { source: "DashboardUI", name: "DSC07459.jpg", type: "image/jpeg", data: File } upload_widget.js:247:640
LOG: Added file: DSC07459.jpg, dsc07459jpg1497792680000, mime type: image,jpeg upload_widget.js:239:11045
LOG: XHRUpload is uploading... upload_widget.js:239:11045
LOG: uploading 1 of 1 upload_widget.js:239:11045
uncaught exception: Upload error (unknown)
I also don’t understand what could be the expected values in case of method PUT without fields set and just the URL.
Thank you so much for the help.
Greeting from Italy