Direct Download API: video file response
AnsweredFirst, it's really cool to be able to download at any point(pos), thanks for that.
But from that point I found 1 point when testing.
== When I try to download invalid video( pos not exists in return of /ec2/recordedTimePeriods ) ==
The response I got contains header 'Content-Length' equal to 0 which is 0 bytes gonna be downloaded.
That is correct.
== When I try to download valid video ==
The response I got doesn't contain header 'Content-Length', so I don't know the file size I should expect.
Question
I planned to use file size to check the validation of video file. Do you have any other parameters for me to check the video validation( same result as we select the same 'pos' and 'duration' and export from desktop version )?
-
Hello Wisanu,
The Server transfers requested video file on the fly, so to say, right away from the archive until the end of the requested period, without calculating actual size to be downloaded. The Server uses Transfer-Encoding: chunked in this case. That's why there is no 'Content-Length' header, since it is optional by standard and is omitted.
I'm not sure I understood what you mean by "validation".
Could you explain in more details what do you want to achieve?
0 -
Thanks for replying,
I'll try to explain what I experienced.
In my local case, I tested it during downloading video, I closed a server half way.
What I expect
Response code is 5xx as server is down or some other errors to inform that downloading is interrupted
What I get
Response code is 200, no error.
Anyway, the video has been cut half way
P.S. I know my case is extream as a server down is very critical, but still possible.
Let me know if I misunderstood somethings, thanks.
0 -
The server sends a 200 response header before sending the actual data, so if you stop the server half-way, it is too late to change the response.
Also, if the server is stopped abruptly - the process is dead and it cannot send anything.
We will not be able to change the behavior here
0
Please sign in to leave a comment.
Comments
3 comments