Uploading different object other than File?
Opened this issue · 16 comments
I want to be able to upload other fileTypes such as Blobs to get image uploads working through Canvas. I'm not always going to have users input files because I want to be able to upload without a user having to attach their file to an input field.
I've hit a dead end on this as well. Would be a great feature to be able to upload blobs (i.e. non File type).
+1
+2
+9000!
this would be great!
(for me it would be enough to be able to upload File{} instead of FileList[], since you can make files from base64 or blob using new File() or form FilseList[] using [0].files[i])
https://github.com/geritol/S3
No big changes in the code but allows you to upload files in an array. Just make files from you blob, add them to an array, and upload it.
(package works only locally, so clone the repository to your packages folder, then install it with geritol:s3)
Hey guys, the package now supports base64 so it works nicely with mdg:camera. I'll add blobs this weekend ^_^.
+1 for Blob support! :)
Hey there, is blob support something that's still on your radar? Cheers!
Hey! It totally is, I thought I had added it already though, lol. Let me double check the code, I might have it in the backburner instead.
Awesome, thank you so much for checking!
I tried some experimenting, but have been unsuccessful in my renewed attempts to pass a blob file... were you able to verify that a blob is permissible? I apologize for nagging, I'm super close to wrapping up this feature request. :) Thank you again!
Hey! Sorry for the delay! I don't have that feature in yet :/ have you forked the project and attempted adding it? If you have I'll gladly check out the code and fold it in.
Hi @Lepozepo! First off, thanks for the great package. Can you point me in the right direction for blob support? Trying to get it working with mdg:camera.
Figured it out. For anyone else looking for how to upload a base64 from the mdg:camera package here's the code I used below. [data] is the variable containing the base64 wrapped in array brackets.
S3.upload({
files: [data],
path: "photos",
encoding: "base64"
}, function(error,result){
console.log(error);
console.log(result);
});