Skip to content

Instantly share code, notes, and snippets.

@rnicholus
Created July 8, 2016 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rnicholus/19a1de64f961e226bd0a10935f814b18 to your computer and use it in GitHub Desktop.
Save rnicholus/19a1de64f961e226bd0a10935f814b18 to your computer and use it in GitHub Desktop.
$('#fineUploader').fineUploaderS3({
request: {
endpoint: "http://mybucket.s3.amazonaws.com",
accessKey: "MY_AWS_PUBLIC_ACCESS_KEY",
params: {category: "foobar"}
},
signature: {
endpoint: "/s3/signtureHandler"
},
uploadSuccess: {
endpoint: "/s3/uploadSuccessful"
},
iframeSupport: {
localBlankPagePath: "success.html"
},
objectProperties: {
key: function(fileId) {
var keyRetrieval = new qq.Promise(),
filename = $("#fineUploader").fineUploader("getName", fileId);
$.post("createKey.html", {name: filename})
.done(function(data) { keyRetrieval.success(data.key); })
.fail(function() { keyRetrieval.failure(); });
return keyRetrieval;
}
},
validation: {
allowedExtensions: ["gif", "jpeg", "jpg", "png"],
acceptFiles: "image/gif, image/jpeg, image/png",
sizeLimit: 5000000,
itemLimit: 3
},
retry: {
enableAuto: true
},
chunking: {
enabled: true
},
resume: {
enabled: true
},
deleteFile: {
enabled: true,
endpoint: "/fileHandler"
},
paste: {
targetElement: $(document),
promptForName: true
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment