Question:
I am using a Chilkat Http Active X control to upload video to TwitVid/Telly via a desktop application. I am able to upload small videos using their API but hen I try to upload anything over 1MB..which is still not very large, I get a 413 Request Entity Too Large error. The only info I can find about this error is how to configure your Nginx server, but nothing on what to do as a user of an API. I am wondering if there is a setting in the HTTP Post I should be using to help combat this.
If the server has set a limitation where it won't accept any file uploads greater than 1MB in size, then the only solution is to reconfigure the server to increase the size limit of what it will accept.
I don't believe this is the case. They actually say the limit is 2GB
Is it possible that the upload is reporting the wrong size to the server? That's the only thing that's turned up via Google. Weird that <1MB is fine though.
Use the http.SessionLogFilename property to log the exact HTTP requests and responses. You can then see everything exactly as it is sent and received...
Here is a log of a failed upload.
---- Sending ---- POST /api/uploadAndPost HTTP/1.1 X-Verify-Credentials-Authorization: OAuth oauth_consumer_key="xxxxxxxxxxxxxxxx", oauth_nonce="xxxxxxxxxxx", oauth_signature="xxxxxxxxx", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1400523872", oauth_token="xxxxxxxxxx", oauth_version="1.0" X-Auth-Service-Provider: https://api.twitter.com/1.1/account/verify_credentials.json MIME-Version: 1.0 Connection: Keep-Alive Accept-Encoding: gzip, deflate Accept-Language: en-US,* User-Agent: Mozilla/5.0 Host: im.twitvid.com Content-Type: multipart/form-data; boundary=------------060107020503090808050004 Content-Length: 2807277 --------------060107020503090808050004 Content-Disposition: form-data; name="format" json --------------060107020503090808050004 Content-Disposition: form-data; name="media"; filename="2014-5-19-39553.mp4" Content-Type: application/octet-stream .....file content is here..... --------------060107020503090808050004-- ---- Received ---- HTTP/1.1 413 Request Entity Too Large Server: nginx Date: Mon, 19 May 2014 18:24:37 GMT Content-Type: text/html Content-Length: 192 Connection: close <html> <head><title>413 Request Entity Too Large</title></head> <body bgcolor="white">413 Request Entity Too Large
nginx </body> </html>
It looks like you might be sending the request to the wrong URL? https://api.twitter.com/1.1/account/verify_credentials.json sounds like it should be used for authetication purposes, not uploading video content.
No, it's correct. It works with videos under 1MB. You send the authorization head with api.twitter.com but the upload host is twitvid.com