Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am serargz on github.
* I am sergioag (https://keybase.io/sergioag) on keybase.
* I have a public key whose fingerprint is BEF4 90A3 CB1E BCD6 FA12 80B6 4C32 BA57 4160 E2DE
To claim this, I am signing this object:
@serargz
serargz / file_upload.js
Created May 14, 2013 22:37
Amazon s3 direct upload with Cordova (Phonegap)
function upload_media(imgURI) {
var options = new FileUploadOptions();
options.fileKey="file";
var time = new Date().getTime();
var fileName = time+".jpg";
options.fileName = fileName;
options.mimeType ="image/jpeg";
options.chunkedMode = false;
var uri = encodeURI("http://<your bucket name>.s3.amazonaws.com/");