Forums Issues

max_length on upload

Subscribe to max_length on upload 2 posts, 2 voices

 
Avatar Ryan 1 post

Hi,

I’m working on calling HeyWatch using an HttpRequest-based object in .NET. The upload is working correctly, except when I try to specify a max_length that is less than the length of the uploaded video. The video I am testing with is 21 seconds long. When I set max_length >= 21, the upload is fine; when I set it to <= 20, I get a “400 Bad Request”. I was expecting the max_length option to cut off the video at [max_length] seconds if it was over the given limit, but now I’m realizing that it simply does not do the upload. Is this correct behavior? If so, is there any way for me to interpret the response so that I know the “400 Bad Request” is because of the max_length and not some other unknown reason? Thanks.

Ryan

 
Avatar Bruno Celeste 375 posts

Yes, you’re correct. The max_length parameter allows you to not accept video longer than the value you give. If the video is too long, you get a 400 error with the following message:

Video too long

Forums Issues