In my Java app I’m using chunked upload endpoint to upload GIFs and Videos for media post. The Issue I experience is that I’m able to upload GIFs, but can’t upload video (mp4) media, note that the same code is used for both.
As a failure response for video I get code: 400, message: Bad request on FINALIZE step.
Here is how I do it:
-
INIT
Params:
** Params: command=INIT, total_bytes=XYZ, media_type=image/gif (or media_type=video/mp4)
-
APPEND
** Params: command=APPEND, media_id=ZYX (retruned by INIT), segment_index=0 (testing with small media, not creating chinks)
** Using apache MultipartEntityBuilder - mode set to BROWSER_COMPATIBLE, content type to APPLICATION_OCTET_STREAM
-
FINALIZE
** Params: command=FINALIZE, media_id=ZYX (retruned by INIT)
Here are media examples I use:
GIF: http://wiki.compsci.ca/images/e/e5/Compsmash-small.gif
VIDEO: http://ia802302.us.archive.org/27/items/Pbtestfilemp4videotestmp4/video_test.mp4
Did someone experience similar issue?