> For the complete documentation index, see [llms.txt](https://en.help.firstline.cc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://en.help.firstline.cc/feature/admin/file-management.md).

# File management

## Overview

FIRST LINE provides centralized file management. When uploading images to the knowledge base, replying to customer attachments in the help desk, or using files in other features, you can view related file information in File Management and manage public access permissions and share links as needed.

<figure><img src="https://3300265106-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2F6Gxshu748ijpjQytEDjO%2Fimage.png?alt=media&amp;token=64b02fb1-debb-47fc-854c-6814547772f5" alt=""><figcaption></figcaption></figure>

## File upload and basic information

When uploading a single file through File Management, the system's file creation interface limits it to about **25 MB**Different features may have their own requirements for the number, size, or format of attachments; please refer to each feature's documentation.

File data includes the file name, file size, file type, uploader, and creation time. The file name and whether public access is allowed can be adjusted in the corresponding function in File Management.

{% hint style="info" %}
If no public setting is specified, the File Creation API allows public access by default. However, different features may set the public status themselves, so you cannot assume that all uploaded files will automatically be public.
{% endhint %}

## Public and non-public files

The file's "Allow Public Access" setting determines whether external users can access the file via a normal share link:

* **Allow Public Access**: External users can access the file through a valid share link without signing in to FIRST LINE.
* **Do Not Allow Public Access**: A regular share link does not directly grant access to external users who are not signed in.

Allowing public access does not mean the file will automatically appear on a public website; you still need to obtain the corresponding link. On the other hand, anyone who has a usable public link may be able to access the file it points to; before sharing, make sure the content is appropriate to provide to the recipient.

## File share link management

Multiple share links can be created for the same file, making it easy to manage them separately by use case. In the file's edit or share management area, you can view existing links as well as add or remove share links.

Each share link has an independently generated random identifier, and can be used with the following access conditions:

| Settings                      | Description                                                                                                                                                |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Expiration date               | You can specify an expiration time for the link; if not set, it will not stop working due to time expiry.                                                  |
| Access count limit            | You can limit the number of times the link may be accessed; setting it to 0 means unlimited.                                                               |
| File public access permission | Even if the share link is still within its validity period, external users who are not signed in must still meet the file's Allow Public Access condition. |

Different share links can have different restriction settings, so you don't need to upload the same file repeatedly for each sharing purpose.

<figure><img src="https://3300265106-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2FG1zgXNWzLxJTH8yHIS4Y%2Fimage.png?alt=media&amp;token=547cd362-f04e-46cc-9fb7-0e37adf4711d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The random identifier in the share URL reduces the chance of it being guessed, but the URL itself is not a personal authentication mechanism. If the link is forwarded or made public, others who obtain the link may also be able to access the file. For content that needs restrictions on the sharing period or access scope, it is recommended to set an appropriate expiration time and access count limit.
{% endhint %}

## Preview, download, and delete

Share links can be used to open files, and the system also provides a way to download files. Some images or documents can be displayed directly by the browser; whether previewing in the browser is actually possible depends on the file format and browser support.

**Remove share link**and**Delete file**are two different operations:

* Remove share link: makes that link no longer available; this does not delete the original file or other share links.
* Delete file: removes the file record from File Management, and the system also deletes the corresponding stored file. Before performing this action, confirm whether other features still need to use the attachment.

## Which scenarios use public files?

Some features need customers or third-party messaging platforms to access file content, so they use externally accessible file URLs, for example:

1. **Help desk sends images**: Some text channels need externally readable image URLs to display images in customer conversations.
2. **Email attachments**: When using link attachments, customers can get the file through the URL in the email; if standard email attachments are used, a different delivery method is used.
3. **Features such as the knowledge base reference files**: If the content needs to be provided to external customers, make sure the corresponding file and sharing method meet expectations.

The display methods for images, videos, and general attachments vary across messaging channels; see[Channel message type support](/feature/other/message-type-support-by-channel.md); for email attachment delivery methods, please refer to[Email attachments](/feature/channels/email/email-attachments.md).
