Uploads: replace a file in place, and say which file each version is - #433
Open
jeremy wants to merge 1 commit into
Open
Uploads: replace a file in place, and say which file each version is#433jeremy wants to merge 1 commit into
jeremy wants to merge 1 commit into
Conversation
jeremy
force-pushed
the
upload-versions-api
branch
from
August 5, 2026 20:09
cdea8ec to
38479ac
Compare
Member
Author
|
Updated: both create endpoints now document the Synced from bc3 |
jeremy
force-pushed
the
upload-versions-api
branch
from
August 5, 2026 21:29
38479ac to
5d6cda9
Compare
Member
Author
|
Updated: documents that the Synced from bc3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents a new endpoint for replacing an upload's file, and corrects the
existing versions documentation.
New: Create an upload version
POST /uploads/2/versions.jsonreplaces the file of an existing upload. Theupload keeps its ID, its URL and its comments, and the previous file stays
available as a past version.
Until now the only way to publish a new file was
POST /vaults/2/uploads.json,which creates a new upload with a new ID and a new URL. If you're shipping
successive releases of the same artifact, that means a folder filling up with
app-v0.8.1.exe,app-v0.8.2.exe, … and a download link that has to changeevery time. Use the new endpoint when you want the link to keep working.
Takes the same
attachable_sgidas Create anattachment, plus optional
base_nameanddescription.descriptionis presence-aware: omit it to carrythe previous version's description forward, or send
nullto clear it. Returns201 Createdwith the upload's JSON representation.The project-scoped
POST /buckets/1/uploads/2/versions.jsonalso works and islisted under the legacy routes.
Corrected: Get upload versions
The previous text said "Each version event represents a file replacement."
That was wrong — as the example response directly beneath it showed, with
"action": "created".Three actions appear:
createdandactivemark the upload's publication, andblob_changedmarks a file replacement. Filter onblob_changedto list onlyreplacements.
New: the
uploadobject on version eventsVersion events previously carried event metadata only, so you could tell that
something changed but not which file. Each version event now includes an
uploadobject:filename,content_typeandbyte_size— the file as it was at thatversion.
download_url— that specific version's file. The upload's owndownload_urlalways serves the latest.
app_download_url— the equivalent link for the Basecamp web app.current—truefor the most recent version,falsefor the rest.One nuance worth reading before you rely on
current: it means the newestversion, which isn't necessarily the file you get from the upload's own
download_url. Updating an upload changes its metadata without recording a newversion, so the two can differ. The documentation says this explicitly.
This is an additive change. Existing fields are unchanged.
Synced from bc3
doc/api/byscript/api/sync_to_bc3_api— not a hand-edit.