# File versions and history: questions and answers

Short answers about replacing a file, its history and its earlier
versions: what stays and what changes, the rule that a replacement keeps
the type, who uploaded what, replacing a public file and going back to an
earlier version. Each answer links to the section of
[Versions and history](../files/versions.md) that owns the rule.

## The basics of versions

### What is a version of a file?

One exact set of bytes of a file. A file is a named item with a history of
versions: the first upload makes version 1, and every replacement adds a
new version that becomes the current one.

More: [Versions and history, What a version is](../files/versions.md#what-a-version-is)

### Does Talewright have version history for files?

Yes. Every file keeps its history. Replacing a file adds a version instead
of losing the old one, and the "History" section on the file's page lists
every version with who uploaded it and when.

More: [Versions and history, History](../files/versions.md#history)

### How are the versions of a file numbered?

From 1. Each new version gets the next number.

More: [Versions and history, What a version is](../files/versions.md#what-a-version-is)

### Which version of a file is the current one?

The newest. Exactly one version is the file's current version.

More: [Versions and history, What a version is](../files/versions.md#what-a-version-is)

### Can a version of a file be edited after it was uploaded?

No. A version never changes. Its bytes, size, type and digest are fixed
from the moment it exists.

More: [Versions and history, What a version is](../files/versions.md#what-a-version-is)

### How is a new version of a file created?

By replacing the file. A version exists only for bytes that passed every
upload check: size, type, opening and the malware scan.

More: [Versions and history, What a version is](../files/versions.md#what-a-version-is)

### Does editing a file's name or description create a new version?

No. A version is a set of bytes. The name, folder, status, details and
public link belong to the file, not to a version.

More: [Versions and history, What stays and what changes](../files/versions.md#what-stays-and-what-changes)

### Does Talewright save versions automatically while I work on a file?

No. A version is added only when someone replaces the file with new
bytes.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file)

### Can a file's history branch into two lines?

No. A file's versions form one line. There are no branches.

More: [Versions and history, What a version is](../files/versions.md#what-a-version-is)

### What is the difference between replacing a file and uploading a new file?

Uploading again makes a second file with its own name, status and links.
Replacing keeps the one file, with its name, status, details and links,
and gives it new content.

More: [Versions and history, Summary](../files/versions.md#summary)

### Why should I replace a file instead of uploading the new one beside it?

Every link and every reference keeps working and now leads to the new
content. The file keeps its name, place, status, details and public link.
Only the bytes change.

More: [Versions and history, Summary](../files/versions.md#summary)

### What does a version record about itself?

Its ID, the file it belongs to, its number, the version it replaced, the
SHA-256 digest of its bytes, its size, its type, what is known about its
content, whether an image holds location data, when it was uploaded and
who uploaded it.

More: [Versions and history, What a version is](../files/versions.md#what-a-version-is)

### What is the `digest` of a version?

The SHA-256 of its bytes, written `sha256:<hex>`. Two versions with the
same digest have the same bytes.

More: [Versions and history, What a version is](../files/versions.md#what-a-version-is)

### What does `media` hold on a version?

What is known about its content: the width and height of an image, the
pages of a PDF, and for a video its width, height, duration and codecs. It
is `null` for types that are not opened.

More: [Versions and history, What a version is](../files/versions.md#what-a-version-is)

### What is `parentVersionID` on a version?

The version it replaced. It is `null` for version 1.

More: [Versions and history, What a version is](../files/versions.md#what-a-version-is)

## Replacing a file in the app

### How do I replace a file with a new version?

Open the file's page and choose "Replace file", above the preview. Your
system's file picker opens. Choose one file. The upload starts at once.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file-1)

### Where is the "Replace file" button?

On the file's page, above the preview. It is not in the menus of a
listing.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file-1)

### Can I replace a file by dragging a new file onto it?

No. A file cannot be replaced by dropping a file onto it. Use "Replace
file" on the file's page.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file-1)

### Does replacing a file ask for a confirmation?

No. There is no confirmation. The upload starts as soon as you choose the
file.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file-1)

### Who can replace a file in a workspace?

Every member of the workspace. Replacing needs no more than the right to
change the file.

More: [Versions and history, Who can do what](../files/versions.md#who-can-do-what)

### Which roles can replace an organization folder file with a new version?

Owners and admins of the organization. Other members see no "Replace
file" there, and through the API they get `403 FORBIDDEN`.

More: [Versions and history, Who can do what](../files/versions.md#who-can-do-what)

### Why do I not see "Replace file" on a file's page?

The button is shown to whoever may change the file: every member in a
workspace, owners and admins in the organization folder. A file in the trash
has no "Replace file" either.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file-1)

### Why does the file picker only offer some files when I replace a file?

It offers files of the same type as the file. A replacement must be of the
same type as the file's current version.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file-1)

### How do I follow a replacement while it uploads?

In the upload tray. The row shows the chosen file with the line "Replacing
{name}" and goes through "Uploading", "Verifying" and "Ready" like any
upload.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file-1)

### Why is "Replace file" showing a spinner?

A replacement of this file is being sent and checked. The button is
disabled until it is done.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file-1)

### Do I have to reload the page after replacing a file?

No. When the replacement is ready, the page updates by itself: the
preview, "Download" and "History" show the new version.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file-1)

### Can I replace several files in one go?

No. "Replace file" is on one file's page and takes one file. Replace the
files one by one.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file-1)

### Can I replace a file that is in the trash?

No. A trashed file cannot be replaced, and its page has no "Replace
file". Restore the file first.

More: [Versions and history, Versions and the rest of the product](../files/versions.md#versions-and-the-rest-of-the-product)

### Is a replacement checked like a new upload?

Yes. A replacement is an ordinary upload: the same size limit and the same
checks apply, the malware scan included.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file)

### What happens to the file when a replacement is rejected?

Nothing. The file keeps its version. A replacement that holds malware, or
whose content is another type, is rejected and adds no version.

More: [Versions and history, Edge cases](../files/versions.md#edge-cases)

### Can I cancel a replacement that is uploading?

Yes, like any upload: choose "Cancel" on its row in the tray while it
reads "Waiting" or "Uploading". The file then keeps its current version.

More: [Uploading, Cancel and retry](../files/uploading.md#cancel-and-retry)

### Can I replace a file from the file listing without opening it?

No. "Replace file" is on the file's page only.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file-1)

### Is a replacement placed in the folder I have open?

No. A replacement names no folder. The file stays where it is.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file)

## What stays and what changes

### What stays the same when I replace a file?

The file's ID, name, folder, status, general access and public link,
description, caption, alt text and tags, field values, everyone's
favorites of it, its `lockVersion` and every earlier version.

More: [Versions and history, What stays and what changes](../files/versions.md#what-stays-and-what-changes)

### What changes when I replace a file?

The current version, with a new ID and the next number, the size, the
digest and what is known about the content, the thumbnail and the preview,
who last updated the file and when, and which other files are its
duplicates.

More: [Versions and history, What stays and what changes](../files/versions.md#what-stays-and-what-changes)

### Does a file keep its name when I replace it with a file that is named differently?

Yes. The file keeps its own name, whatever the replacement was called on
your computer. Replacing `logo.png` with a file called `logo-final-v3.png`
leaves a file named `logo.png`.

More: [Versions and history, What stays and what changes](../files/versions.md#what-stays-and-what-changes)

### Does a file stay in its folder when it is replaced?

Yes. The folder stays.

More: [Versions and history, What stays and what changes](../files/versions.md#what-stays-and-what-changes)

### Does a replaced file keep its approval?

Yes. The status belongs to the file, not to its bytes. A file that was
"Approved for public use" before is still approved after. If the new
content needs a fresh review, an owner or admin sets another status.

More: [Versions and history, What stays and what changes](../files/versions.md#what-stays-and-what-changes)

### Does the file's ID change when it gets a new version?

No. The file's ID stays. Only the current version has a new ID.

More: [Versions and history, What stays and what changes](../files/versions.md#what-stays-and-what-changes)

### Are tags and field values kept when a file is replaced?

Yes. The description, caption, alt text, tags and field values all stay.

More: [Versions and history, What stays and what changes](../files/versions.md#what-stays-and-what-changes)

### Is the alt text still right after I replace an image?

Not necessarily. The alt text is kept as it was. It belongs to the file,
not to a version, so check it yourself when the new image shows something
else.

More: [Versions and history, What stays and what changes](../files/versions.md#what-stays-and-what-changes)

### Does replacing a file interrupt someone who is editing its details?

No. `lockVersion` does not move, so someone editing the file's details at
the same time is not interrupted. Both succeed.

More: [Versions and history, What stays and what changes](../files/versions.md#what-stays-and-what-changes)

### Does a replaced file move to the top of the listing?

Yes, in a listing sorted by "Recently updated". The file counts as
updated.

More: [Versions and history, What stays and what changes](../files/versions.md#what-stays-and-what-changes)

### Does the thumbnail update when I replace a file?

Yes. The thumbnail and the preview are made anew for the new version.
Until they are made, `previewStatus` is `pending` and the file shows its
type icon.

More: [Versions and history, What stays and what changes](../files/versions.md#what-stays-and-what-changes)

### What happens when I replace a file with exactly the same file?

A new version is added, with the same digest. A replacement always adds a
version.

More: [Versions and history, Edge cases](../files/versions.md#edge-cases)

### Does replacing a file change who "last updated" it?

Yes. Who last updated the file, and when, changes to the person who
replaced it.

More: [Versions and history, What stays and what changes](../files/versions.md#what-stays-and-what-changes)

### Does replacing a file change which files are its duplicates?

Yes. Files are compared by their current versions, so the duplicates
follow the new bytes. Earlier versions are not compared.

More: [Versions and history, Versions and the rest of the product](../files/versions.md#versions-and-the-rest-of-the-product)

### What happens to a video's playback when I replace the video?

What its page plays is made anew. When a QuickTime movie is replaced by
another, "Preparing video" shows again until the new playback rendition is
ready.

More: [Versions and history, Edge cases](../files/versions.md#edge-cases)

### Do favorites of a file survive a replacement?

Yes. Everyone's favorites of the file stay.

More: [Versions and history, What stays and what changes](../files/versions.md#what-stays-and-what-changes)

### Does `hasLocationData` carry over to a new version?

No. It belongs to the version. It is `true` for the new version only when
that image's metadata holds a GPS position.

More: [Versions and history, What stays and what changes](../files/versions.md#what-stays-and-what-changes)

## The type rule for replacements

### Does a replacement have to be the same file type?

Yes. A replacement must be of the same type as the file's current version.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Why must a replacement be of the same type as the file?

Because of the public link. It keeps its address and its name, so it must
keep serving the same kind of file.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### How do I switch a file to another format when I cannot replace it?

Upload the new file as a new file. A replacement keeps the type.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Can I replace a PNG with a JPEG?

No. A PNG does not replace a JPEG and a JPEG does not replace a PNG. They
are different types. Upload it as a new file.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Can I replace a `.jpg` file with a `.jpeg` file?

Yes. Both are JPEG. Another extension of the same type is fine.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Can I replace a `.psd` file with a `.psb` file?

Yes. Both are the Photoshop type.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Can I replace an `.mp4` with an `.m4v`?

Yes. Both are MP4.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Can I replace a `.md` file with a `.markdown` file?

Yes. Both are Markdown.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Can I replace an MP4 with a QuickTime movie?

No. QuickTime does not replace MP4. Upload the movie as a new file.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Can I replace a HEIC photo with a HEIF photo?

No. HEIF does not replace HEIC. The two are different types, although they
look close.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Can I replace a PDF with a Word document?

No. A Word file does not replace a PDF, and a PDF does not replace a Word
file.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Can I replace a JPEG with a PDF of the same picture?

No. A PDF does not replace a JPEG.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Can I replace a PNG logo with an SVG logo?

No. SVG and PNG are different types. Upload the SVG as a new file.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Can I replace a Canon `.cr2` raw photo with a `.cr3`?

No. The two have different stored types, `image/x-canon-cr2` and
`image/x-canon-cr3`, and a replacement must have the stored type of the
current version.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Can I replace a `.mov` file with a `.qt` file?

Yes. Both extensions are the QuickTime type.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Can I replace a `.heif` file with a `.hif` file?

Yes. Both extensions are the HEIF type.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Can I replace a WOFF font with a WOFF2 font?

No. WOFF and WOFF2 are different types. Upload the WOFF2 font as a new
file.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Can I replace a CSV with an Excel file?

No. CSV and Excel are different types.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Can I replace a text file with a Markdown file?

No. Plain text and Markdown are different stored types, `text/plain` and
`text/markdown`.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### Does the replacement's type go by the file's name or by its content?

By the stored type of the current version (`mime`), not by the extension
in the file's name.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### I renamed `logo.png` to `logo.jpg`. Which type must a replacement be?

A PNG. The type comes from the current version, not from the name.

More: [Versions and history, Edge cases](../files/versions.md#edge-cases)

### What does "Replace it with a file of the same type (.png)" mean?

The replacement is of another type than the file's current version. The
start answers `409 CONFLICT` with reason `DIFFERENT_TYPE`. Use a file of
the same type, or upload it as a new file.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### What happens when a replacement is named `.png` but holds a JPEG?

The upload is rejected with `TYPE_MISMATCH`, and the file keeps its
version. The replacement's bytes are checked against the type like every
upload.

More: [Versions and history, Edge cases](../files/versions.md#edge-cases)

### Is a replacement of another type refused before or after it is sent?

Before. The type is checked when the upload starts. Nothing is created and
no bytes need to be sent.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file)

## Replacing a public file

### What happens to the public link when I replace a file?

It stays the same and serves the new version as soon as that version is
current. The public link always serves the current version.

More: [Versions and history, Replacing a public file](../files/versions.md#replacing-a-public-file)

### Can a member replace a file that has a public link?

Yes, in a workspace. Anyone who may change a file may replace it. Making
the file public was the decision of an owner or admin. Replacing its
content is not a new decision about access.

More: [Versions and history, Replacing a public file](../files/versions.md#replacing-a-public-file)

### Is there a warning before a public file is replaced?

No. No confirmation is asked, also for a public file.

More: [Versions and history, Replacing a public file](../files/versions.md#replacing-a-public-file)

### How quickly does a public link show the new version after a replacement?

As soon as the new version is current. A browser that loaded the link
shortly before may show the earlier version for up to 60 seconds.

More: [Versions and history, Replacing a public file](../files/versions.md#replacing-a-public-file)

### Why does my public link still show the old file after I replaced it?

A browser that loaded the link shortly before may show the earlier version
for up to 60 seconds. After that it serves the new version.

More: [Versions and history, Replacing a public file](../files/versions.md#replacing-a-public-file)

### Can people still reach the earlier version through the public link after a replacement?

No. The earlier version is no longer reachable through the public link. It
is still in the history for the people who can open the file.

More: [Versions and history, Replacing a public file](../files/versions.md#replacing-a-public-file)

### Does replacing a public file make it restricted until someone approves it again?

No. The file's status and general access are untouched. The link serves
the new version at once.

More: [Versions and history, Replacing a public file](../files/versions.md#replacing-a-public-file)

### How do I keep members from changing what a public link serves?

Keep the file in the organization folder, which only owners and admins
change, or restrict it. In a workspace every member may replace a file,
public or not.

More: [Versions and history, Replacing a public file](../files/versions.md#replacing-a-public-file)

### What happens when I replace a public image with one that holds GPS data?

The link serves the new image, location data included, because bytes are
served exactly as uploaded. `hasLocationData` is `true` for the new
version, and the app's sharing controls say so.

More: [Versions and history, Replacing a public file](../files/versions.md#replacing-a-public-file)

### Is it recorded who replaced a public file?

Yes. The replacement is recorded in the audit trail with the person who
did it, and the file's history names who uploaded each version.

More: [Versions and history, Replacing a public file](../files/versions.md#replacing-a-public-file)

### Do I have to update my website when I replace a file that it links to?

No. The public link keeps its address and serves the new version. That is
the point of replacing instead of uploading a second file.

More: [Versions and history, Summary](../files/versions.md#summary)

### Do resized images of a public file follow a replacement?

Yes. The resized images of a public link follow the current version.

More: [Versions and history, Versions and the rest of the product](../files/versions.md#versions-and-the-rest-of-the-product)

## When someone replaced the file first

### What happens when two people replace the same file at the same time?

Exactly one replacement becomes the next version. The other is rejected
with `STALE_FILE_VERSION`, and its bytes are not kept.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file)

### Someone replaced the file while my replacement was uploading. What happened to mine?

It was refused: the tray says "Rejected: Someone replaced this file
first". Nothing of it was kept. Choose "Reload latest", look at their
version, and replace the file again if you still want to.

More: [Versions and history, When someone replaced the file first](../files/versions.md#when-someone-replaced-the-file-first)

### Can my replacement overwrite a version I have not seen?

No. Your replacement is based on the version the page showed when you
opened it. If the file got another version since, yours is refused.

More: [Versions and history, When someone replaced the file first](../files/versions.md#when-someone-replaced-the-file-first)

### Why is "Replace file" disabled after someone else replaced the file?

Your page is stale. It shows "This file changed since you opened it.
Reloading keeps your unsaved edits." and "Replace file" and "Move to
trash" are disabled until you choose "Reload latest".

More: [Versions and history, When someone replaced the file first](../files/versions.md#when-someone-replaced-the-file-first)

### How do I replace a file on top of a colleague's newer version?

Choose "Reload latest" on the file's page. The history then shows the
other person's version, and you can replace the file again, now on top of
theirs.

More: [Versions and history, When someone replaced the file first](../files/versions.md#when-someone-replaced-the-file-first)

### What happens to my replacement when the file is moved to the trash meanwhile?

It is rejected with `IN_TRASH`: the tray says "Rejected: The file is in
the trash". A trashed file cannot change. Restore the file, then replace
it again.

More: [Versions and history, Edge cases](../files/versions.md#edge-cases)

### I had a file's page open for a while. Can I still replace the file from it?

Only if nobody replaced it meanwhile. Each page works from what it loaded,
so a replacement from a page that shows an earlier version is refused as
stale. Reload first.

More: [Versions and history, Edge cases](../files/versions.md#edge-cases)

### When is a replacement checked against the file's current version?

Twice. When the upload starts, and again when the checks have passed and
the version is about to be added.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file)

## The history of a file

### Where do I see the history of a file?

In the "History" section in "Details", on the file's page. It is last,
across both columns, so it grows downward.

More: [Versions and history, History in the app](../files/versions.md#history-in-the-app)

### What does the "History" section show?

The versions, newest first: "Version 3", "Version 2", "Version 1". Under
each: "Uploaded by {name}, {date and time} · {size}".

More: [Versions and history, History in the app](../files/versions.md#history-in-the-app)

### How do I see who uploaded each version of a file?

Open the "History" section. Each version reads "Uploaded by {name}" with the
date and time.

More: [Versions and history, History in the app](../files/versions.md#history-in-the-app)

### How do I see when a file was last replaced?

Open the "History" section. The top entry is the current version, with the
date and time it was uploaded.

More: [Versions and history, History in the app](../files/versions.md#history-in-the-app)

### Is the current version marked in the history?

No. It has no special label. The top entry of the history is the current
version.

More: [Versions and history, History in the app](../files/versions.md#history-in-the-app)

### What does "Load older versions" do?

It shows more of the history when the history is long.

More: [Versions and history, History in the app](../files/versions.md#history-in-the-app)

### The "History" section will not load. What do I do?

Choose "Retry". The section says "Could not load the history." when the
versions could not be loaded, and "Loading the history" while it loads.

More: [Versions and history, History in the app](../files/versions.md#history-in-the-app)

### Can I see the history of a file that is in the trash?

Yes. The history is shown for a file in the trash too.

More: [Versions and history, History in the app](../files/versions.md#history-in-the-app)

### Can every member see a file's history?

Yes. Everyone who can open the file sees its history: every member of the
workspace, and every member of the organization for an organization folder file.

More: [Versions and history, Who can do what](../files/versions.md#who-can-do-what)

### In which order does the history list versions?

Newest first. The first entry is the current version.

More: [Versions and history, History](../files/versions.md#history)

### Does the history show what changed between two versions?

No. Each entry carries the version's number, size, type, digest, who
uploaded it and when. To compare two versions, download both.

More: [Versions and history, History](../files/versions.md#history)

### Does the history list renames, moves or status changes?

No. The history lists versions. Other changes to a file are recorded in
the audit trail.

More: [Versions and history, History](../files/versions.md#history)

### Can I add a note or a label to a version?

No. A version has a number, not a name or a note. It records who uploaded
it and when.

More: [Versions and history, What a version is](../files/versions.md#what-a-version-is)

### Does the history show the name the file had when a version was uploaded?

No. Versions have no names of their own. The file has one name, its
current one.

More: [Versions and history, Edge cases](../files/versions.md#edge-cases)

### What happens to a file's history when the file is deleted for good?

It goes with the file. The history and every version then answer `404
NOT_FOUND`.

More: [Versions and history, History](../files/versions.md#history)

## Earlier versions

### What is an earlier version called when I download it?

It carries the file's current name, not what the file was called when that
version was uploaded.

More: [Versions and history, Downloading an earlier version](../files/versions.md#downloading-an-earlier-version)

### Are earlier versions deleted after some time?

No. Every version stays downloadable for as long as the file exists.

More: [Versions and history, Downloading an earlier version](../files/versions.md#downloading-an-earlier-version)

### Can I delete a single version of a file?

No. A version cannot be deleted by itself. Versions go only when the whole
file is deleted for good.

More: [Versions and history, What a version is](../files/versions.md#what-a-version-is)

### How do I remove an old version that should no longer exist?

You cannot remove one version. To get rid of it, an owner or admin deletes
the whole file for good, and the current content is uploaded as a new
file. That new file starts at version 1, without the old file's details
and links.

More: [Versions and history, What a version is](../files/versions.md#what-a-version-is)

### Are earlier versions of a public file public?

No. A public link serves the current version only. Earlier versions are
for people who can open the file.

More: [Versions and history, Replacing a public file](../files/versions.md#replacing-a-public-file)

### Can I look at an earlier version without downloading it?

No. The "History" section offers "Download" for each version, and the
preview on the file's page shows the current version.

More: [Versions and history, History in the app](../files/versions.md#history-in-the-app)

### Are the thumbnails and previews of earlier versions kept?

Yes. Thumbnails and previews of earlier versions are kept too.

More: [Versions and history, Downloading an earlier version](../files/versions.md#downloading-an-earlier-version)

### Does "Download" above the preview ever give me an old version?

No. "Download" above the preview always saves the current version.

More: [Versions and history, Downloading an earlier version in the app](../files/versions.md#downloading-an-earlier-version-in-the-app)

### Can a member of the organization download earlier versions of an organization folder file?

Yes. Every member of the organization can download any version of an
organization folder file.

More: [Versions and history, Who can do what](../files/versions.md#who-can-do-what)

## Going back to an earlier version

### How do I restore an earlier version of a file?

Download the earlier version from the "History" section, then replace the
file with it. There is no "restore this version" action.

More: [Versions and history, Going back to an earlier version](../files/versions.md#going-back-to-an-earlier-version)

### Which version number do I get when I go back to an old version?

A new one. The result is a new version with the old bytes: version 3 with
the bytes of version 1 follows version 2.

More: [Versions and history, Going back to an earlier version](../files/versions.md#going-back-to-an-earlier-version)

### Does going back to an earlier version remove the versions after it?

No. History only grows. The history keeps every step.

More: [Versions and history, Going back to an earlier version](../files/versions.md#going-back-to-an-earlier-version)

### I replaced a file with the wrong file. How do I undo it?

Download the version before it from the "History" section and replace the
file with it. The wrong version stays in the history, and the file's
current content is right again.

More: [Versions and history, Going back to an earlier version](../files/versions.md#going-back-to-an-earlier-version)

### I replaced the wrong file. Is its old content lost?

No. Earlier versions are kept, unchanged. Download the previous version
from the file's history and replace the file with it.

More: [Versions and history, Summary](../files/versions.md#summary)

### Can I undo a replacement with Cmd+Z?

No. There is no Undo for a replacement. Go back by replacing the file with
its earlier version.

More: [Versions and history, Going back to an earlier version](../files/versions.md#going-back-to-an-earlier-version)

### Can I make version 2 current again after version 3?

Yes. Download version 2 and replace the file with it. That makes version
4.

More: [Versions and history, Edge cases](../files/versions.md#edge-cases)

## Versions in everyday work

### How do I update our logo everywhere it is used?

Replace the logo file instead of uploading a new one. The file keeps its
name, status and public link, and every link now serves the new logo.

More: [Versions and history, Summary](../files/versions.md#summary)

### How do I keep old versions of our logo?

Replace the logo file when it changes. Every earlier version stays in the
file's history and can be downloaded at any time.

More: [Versions and history, Downloading an earlier version](../files/versions.md#downloading-an-earlier-version)

### A freelancer sent a new file with another name. Can I use it to replace ours?

Yes, when it is of the same type. The file keeps its own name, whatever
the replacement was called.

More: [Versions and history, What stays and what changes](../files/versions.md#what-stays-and-what-changes)

### We are switching our logo from PNG to SVG. Can I replace the file?

No. A replacement keeps the type. Upload the SVG as a new file. It is a
separate file, with its own status and its own links.

More: [Versions and history, The type rule](../files/versions.md#the-type-rule)

### How do I find out which version of a product photo is current?

Open the photo's page. The preview and "Download" show the current
version, and the top entry of the "History" section is the current one.

More: [Versions and history, History in the app](../files/versions.md#history-in-the-app)

### How do I hand an earlier version of a file to a client?

Download that version from the "History" section and send them the file.
Earlier versions are not reachable through the public link.

More: [Versions and history, Downloading an earlier version in the app](../files/versions.md#downloading-an-earlier-version-in-the-app)

### Is an email sent when someone replaces a file?

No. No email is sent about a replacement. The "History" section shows who
uploaded each version and when.

More: [Versions and history, History in the app](../files/versions.md#history-in-the-app)

## Versions and the rest of Talewright

### What happens to a file's versions when I move it to the trash?

They are kept. A restore brings the file back with its whole history.

More: [Versions and history, Versions and the rest of the product](../files/versions.md#versions-and-the-rest-of-the-product)

### Are all versions deleted when a file is deleted permanently?

Yes. Deleting a file for good deletes every version.

More: [Versions and history, Versions and the rest of the product](../files/versions.md#versions-and-the-rest-of-the-product)

### Which version of a file does an organization export contain?

The current version only.

More: [Versions and history, Versions and the rest of the product](../files/versions.md#versions-and-the-rest-of-the-product)

### Are earlier versions compared when Talewright looks for duplicate files?

No. Files are compared by their current versions.

More: [Versions and history, Versions and the rest of the product](../files/versions.md#versions-and-the-rest-of-the-product)

### Does the type filter look at earlier versions of a file?

No. The type filter goes by the current version.

More: [Versions and history, Versions and the rest of the product](../files/versions.md#versions-and-the-rest-of-the-product)

### Does each version of a file have its own status?

No. A file has one status or none. The status belongs to the file and
stays when the file is replaced.

More: [Versions and history, What stays and what changes](../files/versions.md#what-stays-and-what-changes)

### Does each version have its own public link?

No. The file has one public link, and it serves the current version.

More: [Versions and history, Replacing a public file](../files/versions.md#replacing-a-public-file)

## Versions through the API

### Which API operations work with versions?

`GET W/files/{fileID}/versions` lists the history,
`GET W/files/{fileID}/versions/{versionID}/content` downloads a version,
`POST W/files/{fileID}/versions/{versionID}/signed-url` makes a temporary
link to one, and `POST W/uploads` with `targetFileID` and `baseVersionID`
replaces the file. The organization folder has the same four.

More: [Versions and history, Operations](../files/versions.md#operations)

### Where does an API client get `baseVersionID` from?

From a read of the file. `GET W/files/{fileID}` carries `currentVersion`,
and its `id` is the `baseVersionID`.

More: [Versions and history, Operations](../files/versions.md#operations)

### What happens when I send `targetFileID` without `baseVersionID`?

The start answers `422 VALIDATION_FAILED`. The two are always given
together.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file)

### Can a replacement upload name a `folderID`?

No. That answers `422 VALIDATION_FAILED` on `folderID` with the message "a
replacement stays in its file's folder".

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file)

### What does `DIFFERENT_TYPE` mean when I start a replacement?

The replacement is of another type than the file's current version. The
answer is `409 CONFLICT` with reason `DIFFERENT_TYPE`. Use a file of the
same type, or upload it as a new file.

More: [Versions and history, Errors](../files/versions.md#errors)

### In which order is a replacement checked when it starts?

The file is unknown here: `404 NOT_FOUND`. The file is in the trash: `409
CONFLICT`, reason `IN_TRASH`. The current version is no longer
`baseVersionID`: `409 STALE_FILE_VERSION`. The replacement is of another
type: `409 CONFLICT`, reason `DIFFERENT_TYPE`.

More: [Versions and history, Replacing a file](../files/versions.md#replacing-a-file)

### Can I base a replacement on an earlier version of the file?

No. Only the current version can be replaced. A `baseVersionID` that names
an earlier version answers `409 STALE_FILE_VERSION`.

More: [Versions and history, Edge cases](../files/versions.md#edge-cases)

### What happens when `targetFileID` names a file of another workspace?

The start answers `404 NOT_FOUND`. The file must be in the workspace or
organization folder the upload is started in.

More: [Versions and history, Edge cases](../files/versions.md#edge-cases)

### What does a finished replacement upload tell me?

When the upload is `ready`, its `fileID` is the file and its `versionID`
is the new current version. That version's `parentVersionID` is the
version it replaced.

More: [Versions and history, Worked example: replace a file](../files/versions.md#worked-example-replace-a-file)

### Which scope does a credential need to replace a file?

`files:write`. Reading the history and downloading a version need
`files:read`.

More: [Versions and history, Who can do what](../files/versions.md#who-can-do-what)

### What does the history look like in an API answer?

`items`, newest first, and a `nextCursor` while there are older versions.
Each item holds `id`, `fileID`, `number`, `parentVersionID`, `digest`,
`sizeBytes`, `mime`, `media`, `hasLocationData`, `createdAt` and
`createdBy`.

More: [Versions and history, Worked example: read the history](../files/versions.md#worked-example-read-the-history)

### What happens when I ask for a version under the wrong file?

The answer is `404 NOT_FOUND`. A version belongs to one file.

More: [Versions and history, Downloading an earlier version](../files/versions.md#downloading-an-earlier-version)

### Can I read the history of a trashed file through the API?

Yes, and its versions can be downloaded through the API. A temporary link
to a version of a trashed file is refused with `409 CONFLICT`, reason
`IN_TRASH`.

More: [Versions and history, Edge cases](../files/versions.md#edge-cases)

### Can an agent download an earlier version over MCP?

Not as bytes through a tool. The agent asks for a temporary address with
`workspace_files_signed_url`, naming the earlier version, and fetches
that.

More: [Versions and history, Operations](../files/versions.md#operations)

### Does a temporary link to a version change when the file is replaced?

No. A temporary link names one version, so what it serves never changes.

More: [Versions and history, Downloading an earlier version](../files/versions.md#downloading-an-earlier-version)

### Can a member's API key replace a file in the organization folder?

No. Replacing an organization folder file needs an owner or admin. A
member's key gets `403 FORBIDDEN`.

More: [Versions and history, Errors](../files/versions.md#errors)

### Is there an API operation that makes an earlier version current again?

No. Download the earlier version's content and start a replacement upload
with those bytes. The result is a new version.

More: [Versions and history, Going back to an earlier version](../files/versions.md#going-back-to-an-earlier-version)

### Is there an API operation that deletes one version?

No. Nobody can delete a single version. Versions go only when the whole
file is deleted for good.

More: [Versions and history, Who can do what](../files/versions.md#who-can-do-what)
