Closed technoweenie closed 11 years ago
@technoweenie sure, we can change the text so clients are allowed to send some or all of the data along with the file creation request. But consider the problem below:
If it fails, return the appropriate HTTP status and the Location header. That way clients only have to worry about the resumable protocol when necessary.
If the network fails, the server has no way to respond to the client. This means the client won't receive a Location
header, and won't be able to resume the upload as it doesn't know the url for making the resume request. That's why it doesn't make a lot of sense to send data along with the file creation request. What do you think?
That's a good point. The connection will just drop with no response headers or status.
The file creation extension suggests an initial POST to create the file on the server:
Any thoughts on allowing clients attempt to upload the complete file to that request? If the upload finishes, you can respond the same (201 with a Location header). If it fails, return the appropriate HTTP status and the Location header. That way clients only have to worry about the resumable protocol when necessary.