0
votes

I am having trouble requesting the current status of a resumable upload. Based on the Google Documentation, the following request should return a Range header with the current range google has of my upload, but I keep getting the following response:

Failed to parse Content-Range header

Here is my curl request:

curl -H "Content-Range: bytes */1443452365" -H "Content-Length: 0" locationUrl -X PUT

I have also tried "bytes */*" and "*/*" for the Content-Range header, but no luck.

Any ideas?

1
1.4TB?? What happens if you try a slightly smaller file :-) - pinoyyid
tbh, I used different file sizes, that was just a bad example :) - Reinhard Höll

1 Answers

0
votes

First, you need to check the correct request format like the sample given below:

curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"id":100}' http://localhost/api/postJsonReader.do

And, discussed in other command-line tools, when sending raw HTTP data, be aware that the POST and PUT operations will require computing the value for a Content-Length header. You can use the UNIX tool wc to compute this value. Place all the content of the HTTP body into a text file such as template_entry.xml (example used above) and run wc -c template_entry.xml. It is often difficult to debug if you accidentally use an incorrect value for the Content-Length header.

Lastly, you can request the status between chunks, not just if the upload is interrupted. If the upload request is interrupted, follow the procedure outlined in resume an interrupted upload.