Skip to content

Commit 5e2e61c

Browse files
author
Evan Priestley
committed
Explain a subtlety of client handling for "download" batch action
The LFS client uses the presence of the "download" action on an "upload" request to deduce that the object content is already present on the server: the object content must be present, or the server could not offer a "download" action. Since the server already knows the object content, the client does not need to upload a new copy and can skip the transfer step. Make this interaction between the client and server explicit in the documentation.
1 parent b419488 commit 5e2e61c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/api/http-v1-batch.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ when the object has not been previously uploaded.
105105
successfully uploading an object. This is an optional relation for the case that
106106
the server has not verified the object.
107107
* `download` - This relation describes how to download the object content. This
108-
only appears if an object has been previously uploaded.
108+
only appears if an object has been previously uploaded. If object content is
109+
already available, the server should provide this action even if the request
110+
operation is `upload`, because the client can use the presence of this action to
111+
avoid duplicate uploads of object content which is already known to the server.
109112

110113
An action can optionally include an `expires_at`, which is an ISO 8601 formatted
111114
timestamp for when the given action expires (usually due to a temporary token).

0 commit comments

Comments
 (0)