> For the complete documentation index, see [llms.txt](https://docs.pakk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pakk.io/admin-and-reporting/document-storage.md).

# Document Storage

Pakk has simple document storage built right into the system. This is a very quick guide on how to use it and how to get the best out of it.

### Motivation <a href="#motivation" id="motivation"></a>

One of the principal aims of Pakk is to reduce the need to patch together a disparate collection of products and services in order to run your business.

Most business still need to deal with the dreaded *paperwork* and are probably using some sort of digital product/service to process and/or file documents. This might range from informally keeping email attachments in email server folders, through to folder heirarchies in synced file-storage services right up to specialised document storage solutions.

We wanted to provide simple document storage baked right into the platform you use to run your business day-to-day. That way, the **documents that refer to your data live side by side with the data**.

### Creating a document record and uploading <a href="#creating-a-document-record-and-uploading" id="creating-a-document-record-and-uploading"></a>

Documents are *entities* in Pakk, so before *using* a document, you need to create a document record.

To create a document record, go to `Files > Documents > Create New`, select a file from your local computer, name it, tag it and upload it.

> **Organisation Tip** The name you use will help you identify the document, so give your documents short, meaningful names like *Acme Invoice Ref 12345*. *Tags* are like folders or categories, in that they help you group together similar documents so you can filter, sort and search them in the future.

Whilst you can upload any file type, image files (*jpeg*, *png* etc.) and *pdf* files work best as we can generate thumbnail previews for you so you can easily identify documents at a glance. There is a maximum file size limit to avoid needlessly uploading huge files which don't belong in a document storage system!

### Linking a document <a href="#linking-a-document" id="linking-a-document"></a>

The above is useful in-and-of itself, but the magic really happens when you attach your uploaded documents to your data. In Pakk (almost) all *entities* (products, customers, orders, suppliers etc.) have a `Documents` tab. From here, go into `Edit` mode and select `Add New Document`. Now you can search for any document record you previously created and "attach" it to the entity.

Now, when viewing the entity, you have an easy-to-reference list of relevant documents. Here are some ideas on how to use the document linking system:

* Attach physical supplier invoices to *Purchase Orders*
* Attach transport instructions, customs documentation and goods bills to *Purchase Orders*
* Attach internal specification sheets, licences, certificates and manuals to *Products*
* Attach transactional information like credit card claims to *Sales Orders*

Since almost all *entities* on the system can have documentation linked to them, you can create an extremely useful document storage and retrieval system with ease.

### Security <a href="#security" id="security"></a>

Documents you upload are private, non-listable and non-discoverable from the public internet: the only way to access them is through the secret link generated when you upload a file, which looks something like `https://storage.googleapis.com/tenant-documents/account-name/myfolder/F8e9460e8-cf6e-4b42-8078-70aa98161d12`.

You should understand that anyone with access to this link can view and download the document and moreover, share it with more people. You can share this link with trusted third-parties if you want to share a file with them, but once you've shared a link, there's no going back, so if you want to revoke access, you'll need to remove the file.

> **Security Tip** Once you share a link to a file with someone, even if you trust them, you should consider that file "public" until removed. Note that file access through secret links is on a "file-by-file" basis, so having access to one file doesn't grant access to anything else at all.

You should make sure you and your employees understand that they shouldn't share links to internal documents unless they understand the security implications. For the same reasons, ***don't upload highly sensitive documents*** like banking passwords or customer IDs, due to the small risk that you or one of your team might accidentally leak the secret link. Human error happens!

The Pakk document storage system is designed as a useful, transactional document storage system and doesn't come with military grade security or advanced permission-based sharing, so if you need something more than simple storage, retrieval, indexing and occassional simple sharing, you might need a separate system for that.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pakk.io/admin-and-reporting/document-storage.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
