S3 icon indicating copy to clipboard operation
S3 copied to clipboard

Uploading different object other than File?

Open shividhar opened this issue 10 years ago • 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.

shividhar avatar Dec 21 '14 19:12 shividhar

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).

gustechvo avatar Dec 23 '14 23:12 gustechvo

+1

MichaelFBA avatar Jan 11 '15 17:01 MichaelFBA

+2

ghost avatar Jan 11 '15 18:01 ghost

+9000!

Lepozepo avatar Jan 11 '15 18:01 Lepozepo

this would be great!

geritol avatar Jan 19 '15 07:01 geritol

(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])

geritol avatar Jan 19 '15 11:01 geritol

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)

geritol avatar Jan 19 '15 13:01 geritol

Hey guys, the package now supports base64 so it works nicely with mdg:camera. I'll add blobs this weekend ^_^.

Lepozepo avatar Mar 19 '15 23:03 Lepozepo

+1 for Blob support! :)

jasonshouse avatar May 26 '15 21:05 jasonshouse

Hey there, is blob support something that's still on your radar? Cheers!

jasonshouse avatar May 27 '15 22:05 jasonshouse

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.

Lepozepo avatar May 27 '15 22:05 Lepozepo

Awesome, thank you so much for checking!

jasonshouse avatar May 28 '15 21:05 jasonshouse

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!

jasonshouse avatar Jun 03 '15 20:06 jasonshouse

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.

Lepozepo avatar Jun 03 '15 21:06 Lepozepo

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.

jamielob avatar Aug 12 '15 18:08 jamielob

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);
});

jamielob avatar Aug 12 '15 20:08 jamielob