You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The extra form data that is inserted for files can cause issues on the other hand, I suggest adding a optional property of "skipFormData" (Boolean) to the uploader object. Example:
I guess I don't really understand the problem here. There should be a single FormData. FormData is required (afaik but please do correct me if I'm wrong as I would like to know) for upload via JS.
As mentioned in #147, form data is not required, and messes with uploads that should be a binary upload. For example, AWS S3 doesn't support form data (and I'm not sure how it's working for other people, to be honest). I'm using this modified uploader below to be able to upload to S3:
importEmberUploaderfrom'ember-uploader'importEmberfrom'ember'const{ Uploader }=EmberUploaderconst{ get, set }=EmberconstBinaryUploader=Uploader.extend({upload(file){consturl=get(this,'url')constmethod=get(this,'method')set(this,'isUploading',true)returnthis.ajax(url,file,method)}})
I was seeing issues where the uploader would send multipart/form-data, and that data would be stored raw in S3 (including the data boundaries), causing files to become corrupted.
The extra form data that is inserted for files can cause issues on the other hand, I suggest adding a optional property of "skipFormData" (Boolean) to the uploader object. Example:
Then inside the /addon/uploaders/base.js on line 63 the data can be changed to be:
This will skip the form data if the property is set to true, and create the form data if the property is set to false, or is not present.
The text was updated successfully, but these errors were encountered: