# Accessing Your Vault's File Staging

Each Vault in your domain has its own file staging, which supports various features including Vault Loader and Unclassified Document Creation. File staging is a temporary storage area for files you're uploading to or extracting from Vault. For example, when using Vault Loader to create a new document, you upload the source file to file staging before loading the CSV file. The CSV then references the source file location on file staging.

File staging deletes files according to the following rules:

  * <a href="/en/gr/48988/#refresh">Refreshing your Vault</a>
 removes all files from file staging.
  * File staging automatically deletes uploaded files and empty directories after one year.
  * File staging automatically deletes extracted files and folders every 72 hours by default. This auto-deletion timeframe does not apply to files that users upload to file staging.
  * Deleted files are not recoverable.

## File Staging URL

The URL for each file staging area is the same as the corresponding Vault, for example, _veepharm.veevavault.com_.

## How to Access File Staging

You can access your file staging using your [Vault Loader][2], the <a class="external-link " href="https://developer.veevavault.com/docs/#using-file-staging" target="_blank" rel="noopener">Vault API<i class="fa fa-external-link" aria-hidden="true"></i></a>, or [Vault File Manager][1].

### Vault Loader Details {#vl-details}

You can view and manage files and folders on your Vault's file staging using the Vault Loader command line tool. Learn more in the <a href="/en/gr/67334/">Vault Loader File Staging Command Line Tool Reference</a>
.

Users do not need access to file staging to access files on it with Vault Loader. For example, one user with file staging access could upload files, and another user without access could create documents via Vault Loader that reference files on file staging.

### Vault File Manager Details {#vfm-details}

You can view, upload, move, rename, and delete files and folders on your Vault's file staging using Vault File Manager. Users with the _Vault Owner_ or _System Administrator_ security profile can view and access the root folders of all Vault users in the _File Staging_ tab. Users with the _File Staging: Access via Vault File Manager_ permission can view their root folder on the _File Staging_ tab.

### Legacy FTP Access

Veeva no longer recommends accessing file staging via FTP. The <a class="external-link " href="https://developer.veevavault.com/legacyftp/" target="_blank" rel="noopener">Developer Portal<i class="fa fa-external-link" aria-hidden="true"></i></a> has information for any legacy implementations.


## File Staging Limits

The following limits affect file uploads to file staging:

* File names cannot exceed 218 bytes, including the file extension. Note that one character does not always equal one byte. For example, the character "菌" is three bytes.
* Complete folder paths cannot exceed 955 bytes.
* Folders cannot be renamed or moved.
* Folder modification times reported in file listings are incorrect.
* Listing large folders is slow.
  * Structure large datasets into trees and remove old files when they are no longer required to achieve better performance.
* Folder listings are truncated at 65,000 rows.
  * Integrations dependent upon full folder listings should ensure that folders are kept below this value.

Your file staging is a temporary storage solution and you should not retain files on the server for an entire year.

The automated deletion of all content after one year has the following effects on directories:

* Directory objects in the underlying storage are deleted one year after creation.
* Directories with contents will continue to appear until they are empty, at which point they will vanish.

Any integrations that anticipate the existence of a directory should catch the error when the directory does not exist and recreate the directory. Actively accessing content around the time of the automatic deletion can result in corrupted directory listings. This will normally clear after a refresh. If it persists, contact <a class="external-link " href="https://support.veeva.com/hc/en-us" target="_blank" rel="noopener">Veeva Support<i class="fa fa-external-link" aria-hidden="true"></i></a>.

### Inbox Details {#inbox-details}

You can create _Staged_ documents by uploading files to the _Inbox_ directory on your Vault's file staging. _Staged_ is the name of the document type, lifecycle, and lifecycle state. _Staged_ documents are unclassified. You and other users with access can classify these documents like any other unclassified document. However, _Staged_ documents do not use the _Unclassified_ lifecycle and may have different roles and access control settings.

File staging's _Inbox_ is automatically available in all Vaults. Before using this feature, Admins should:

* <a href="/en/gr/6572/">Add default users for the _Editor_ role</a>
 within the _Staged_ document lifecycle.
* <a href="/en/gr/2662/">Modify the _Editor_ role</a>
 within the _Staged_ document lifecycle to assign default users during document creation (using the **Add Default Users When** setting).
* Optional: <a href="/en/gr/2157/">Edit the notification message templates</a>
 used by this feature.

#### Message Templates

* _Cannot Upload LSA to Binder or Placeholder_ (`ftp_inbox_attach_to_unsupported_document__v`): Vault uses this error message when the target document for a rendition is a binder or placeholder.
* _Large Size Asset Attached_ (`ftp_inbox_lsa_uploaded_to_exsting_doc__v`): This notification goes to the user who uploaded a _Large Size Asset_ rendition to an existing document.
* _Cannot Attach Viewable Rendition to Video_ (`ftp_inbox_attach_viewable_rendition_to_video__v`): Vault uses this error message when the target document for an uploaded _Viewable Rendition_ file is a video.
* _Max File Size Exceeded_ (`ftp_upload_too_large__v`): Vault uses this error message when a file exceeds the size limits. It is not specific to file staging's _Inbox_.
* _Missing Rendition Type_ (`ftp_inbox_missing_rendition_type__v`): Vault uses this error message when the uploading user does not specify a rendition type or specifies an invalid rendition type.
* _No Appropriate Permission_ (`ftp_inbox_no_appropriate_rendition_permission__v`): Vault uses this error message when the uploading user attempts to update a document on which they don't have the required permissions.
* _Target Document Not Found_ (`ftp_inbox_target_document_notFound__v`): This error message occurs when the file name targets a Document ID that does not exist. In some cases, the ID is valid, but the user uploading does not have _View Document_ access to the targeted document.


## Clinical Loader (Clinical Operations Only)

In Clinical Operations Vaults, you can use your Vault's file staging to load object record data into Vault. See <a href="/en/gr/46280/">Creating & Updating Records With Vault File Staging</a>
 for details.

## File Staging Permissions {#staging_server_permissions}

To download files from staging, you must have the standard _Vault Owner_ or _System Admin_ security profile or have a custom security profile that includes the _File Staging: Access_ and _API: Access API_ permissions.

File staging does not support SAML SSO authentication.

To upload files to the root folder on file staging, you must have the standard _Vault Owner_ or _System Admin_ security profile. Users with the _File Staging: Access_ permission can upload files to a personal folder.

When referencing a file in a user's personal folder on file staging, you must include the user directory in the file path. For example, Clara is not a _Vault Owner_ or _System Admin_. She can only upload files directly to Vault1234/u5678, where 1234 is her Vault ID and 5678 is her user ID. Clara can still make new directories inside of her user directory, such as /u5678/uploads.

If you are not a _Vault Owner_ or _System Administrator_, you may not see your user directory in file staging. You can locate your user ID by accessing **Admin** > **Users & Groups** > **Vault Users**. The Vault users list displays a column that shows your user ID. You can also run the following VQL query: `SELECT id, username__sys FROM user__sys WHERE (username__sys = 'john.doe@mydomain.com')`.

## File Staging Linking

Admins can link a Vault's file staging to a different Vault, without needing to rely on Veeva Support. You can use **File Staging Linking** during migrations where it's common for users to link file staging rather than manually moving documents between different file staging areas. 

The **File Staging Settings** page allows Admins to view and modify **File Staging Linking**. To use **File Staging Linking**, you must have the standard _Vault Owner_ or _System Admin_ security profile. To manage the permissions for the **File Staging Linking** page, navigate to **Admin > User & Groups > Permission Sets > [Permission Set] > Admin**.

From the **Admin** page, navigate to **Settings > File Staging Settings** to edit the file staging settings for a Vault. 

<a href="https://platform.veevavault.help/assets/images/Screenshot 2024-09-25 at 12.54.55 PM.png" data-lightbox="Screenshot 2024-09-25 at 12.54.55 PM.png" data-title="" data-alt="">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/Screenshot 2024-09-25 at 12.54.55 PM.png" alt="" style="width: 50%;"  />
</a>

This page includes the following sections:

* **Vault Details** provides information about the Vault that the Admin is currently in.
* **Vault** shows the Vault's name and ID. 
* **File Staging used by** indicates whether the Vault's file staging is linked to another Vault. Each Vault can only have one file staging link, but multiple Vaults can point to a single file staging area. 
* **Update File Staging** allows Admins to link the current Vault to a different file staging area. 

### Configuring File Staging Linking

To link a Vault's file staging to a different Vault:

1. From the **File Staging Settings** menu, next to the **Use File Staging from** drop-down, click **Edit**. 
2. The **Use File Staging** from drop-down shows the list of file staging areas that are available to be linked to the Vault that the Admin is currently in. Select an available dropdown option, and click **Save**.
3. A dialog will appear warning the Admin that files in the file staging area of the current Vault will no longer be accessible. Click **Continue** to confirm.

Upon confirmation, the _Link Status_ changes from _Active_ to _Pending_. A notification is available once the linking is complete, and the _Link Status_ will change to _Active_. The amount of time that the link update takes is dependent on the number of files in the selected file staging area. 

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: <strong>File Staging Linking</strong> is unavailable during migrations. The <em>Update File Staging</em> section is hidden if file staging for the Vault that the Admin is currently in is in use by another Vault. To resolve this issue, Admins must remove the linking between the other Vault, and the file staging area of the Vault that the Admin is currently in.</p>
    </div>
  </div>
</div>



### Troubleshooting Error Messages

| Error Message | Troubleshooting Step |
| --- | --- | --- |
| File Staging linking for this Vault could not be completed successfully due to: <br> A stale browser tab allowed an invalid selection. Please refresh Vault Settings tabs and try again. | This error occurred because a stale tab allowed an invalid selection. <br>Refresh the _Vault Settings_ tab and update the linking again. | 
| File Staging linking for this Vault could not be completed successfully due to: <br> Files are currently being transferred to long term storage. Users should wait several minutes and try again. | This error occurred because files in the Vault's existing file staging are currently being transferred over to the Vault. <br> All files need to be transferred over before the file staging link can be updated. | 
| File Staging linking for this Vault could not be completed successfully due to: <br> A server error.| Contact Veeva Support. | 

## Related Permissions

You can complete all steps in this article with the standard _System Administrator_ or _Vault Owner_ security profile. If your Vault uses custom security profiles, your profile must grant the following <a href="/en/gr/22824/">permissions</a>
:

| Type | Permission Label | Controls |
| --- | --- | --- |
| Security Profile | API: Access API | Ability to access your Vault's file staging and download files via the API. |
| Security Profile | Application: File Staging: Access | Ability to access your Vault's file staging and upload documents to a personal folder via the API. |
| Security Profile | Application: File Staging: Access via Vault File Manager | Ability to access your Vault's file staging in Vault File Manager. |
| Security Profile | Application: File Staging: Access Root Folder | Ability to access your Vault's file staging server's root folder. |

[1]: #vfm-details
[2]: #vl-details