Archived from the Transloadit support forum. Originally posted on September 4, 2013; details may be outdated, see our docs for current behavior. Original thread
Hi
Thank you very much for developing a wonderful platform Transloadit. In my scenario, I am giving all the major task to Transloadit, i.e. uploading the image, resizing it and then uploading it to my S3 bucket.
After this template works, Transloadit comes back to my url with all the information that I had specified in my form action. This is good. Everything is working fine till here.
Now I want to return some information from my server to client. I am not finding a way to hookup this response back to Transloadit plugin, so that I can inform user about couple of things. My scenario is Ajax based, so navigating to url that I specified in form action is not an option.
Please guide. Am I missing something very trivial? Following is my script:
<script type="text/javascript">
$(document).ready(function () {
$('#uploadForm').transloadit({
wait: true,
params: {
auth: { key: "####" },
template_id: "####"
},
onProgress: function (bytesReceived, bytesExpected) {
// render your own progress bar!
$('#progress')
.text((bytesReceived / bytesExpected * 100).toFixed(2) + '%');
},
onError: function (assembly) {
alert(assembly.error + ': ' + assembly.message);
},
onSuccess: function () { alert("Upload done"); },
onResult: function () { alert("On Result");}
});
});
</script>
Regards
Pradeep