Created
July 8, 2016 20:02
-
-
Save rnicholus/19a1de64f961e226bd0a10935f814b18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#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