I have users submitting huge (2+GB) files in .mov format to server, the only thing I need to know about that files is few meta-tags (the video itself we upload to youtube from client side).
Obviously I want to be able just parse those meta-tags without uploading the full file to server, moreover - to be able not to initiate uploading video to youtube if metatags is empty or invalid.
I see the following solution of problem:
User selects a file
JS slices from the file first 128kb bytes where metadata is located
JS Submits those bytes to server and server parses its OR JS itself parses it
Since JS have Blob.prototype.slice method of Blob type I use next code:
filePart = file.slice(0, 131072); // first 128kb
Problem is in the last step because I don't know how to parse those sliced bytes.