Archived from the Transloadit support forum. Originally posted on December 7, 2010; details may be outdated, see our docs for current behavior. Original thread
Anyway on the client/server(template) side to do this?
Archived from the Transloadit support forum. Originally posted on December 7, 2010; details may be outdated, see our docs for current behavior. Original thread
Anyway on the client/server(template) side to do this?
No, at this point we only support limiting the total upload size, not the size of individual files. Of course we can add this feature, but I’d love to know more about the reasons why you want to limit individual file size.
This feature would be great for me as I only need avatars for profiles, with 2/3 re-sizes, So I really don’t need 5mb files on s3 when I’ll only be using 100/20kb files. But I still want the original file, but not too big
Well, it’s definitely on our todo list. Another thing we’ll add is advanced step conditions (where you could choose to resize the uploaded file only if it has a certain size). So in the future there should be two good problems to your problem.
But anyway, since you’re uploading Avatar images I’m assuming the form is only supporting single file uploading, so the max_size parameter should work for you?
Yes single file uploads.
From what I can tell you can only do this on the auth param within the form?
What if somebody edits the value before submitting? Or can you add this in the server side template?
{ “auth”:
{
"key": "your key",
"max_size": 1048576
}
, “template_id”: “your templage id” }
If you are using our authentication system with a signature it’s impossible to mess with the parameters as a user. Otherwise using a template within our system also gives a reasonable protection.
Thanks I see it all now, just have to sign it in Java,
so how can you set “max_size” in a template if its within the “auth” closure?
ok sorted it, sorry, just goes in the template, thanks for your help!
Alright, let me know if you have any other questions : )!