An update on this, for those striking odd validation errors and searching for clues.
Due to the vagaries of the platform/language I'm using I had accidentally added the MIME chunks in my direct upload request in reverse order. So instead of:
--<boundary_string>
Content-Type: application/atom+xml; charset=UTF-8
API_XML_request
--BOUNDARY_STRING
Content-Type: VIDEO_CONTENT_TYPE
Content-Transfer-Encoding: binary
<Binary File Data>
--BOUNDARY_STRING--
my MIME content was in this order:
--<boundary_string>
Content-Type: VIDEO_CONTENT_TYPE
Content-Transfer-Encoding: binary
<Binary File Data>
--BOUNDARY_STRING
Content-Type: application/atom+xml; charset=UTF-8
API_XML_request
--BOUNDARY_STRING--
It seems the API is coded in such a way it can only reliably process the chunks if the binary content comes last.
Unfortunately the behaviour experienced was that some uploads would work fine and others would fail with the error:
<?xml version='1.0' encoding='UTF-8'?><errors><error><domain>yt:validation</ domain><code>too_long</code>< location type='xpath'>media:group/ media:keywords/text()</ location></error></errors>
I did not see any other errors returned even when I stripped back my metadata supplied to contain only a media:title and surrounding elements. It would be nice if a relevant error message was returned when this situation was encountered.
I'll be keeping an eye on this situation in case it hasn't been fully resolved, but so far every video I've tried uploading since swapping the MIME chunk order has worked fine. Fingers crossed that this is the answer.
Matt
-- You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To view this discussion on the web visit https://groups.google.com/d/msg/youtube-api-gdata/-/dUfVWFpSozQJ.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.
No comments:
Post a Comment