> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://uploadcare.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://uploadcare.com/docs/_mcp/server.

# File management with Uploadcare

> Implement custom workflows for your uploaded files with Uploadcare REST API.

Implement custom workflows for your uploaded files.

* Manage files with REST API
* Webhooks for various events
* Arbitrary file metadata management
* File tags
* AWS S3 integration
* Video processing
* Document conversion
* Unsafe content moderation
* Object recognition
* Malware protection
* API clients for popular platforms

Once uploaded, you can manage files using REST API and project storage settings.

## How it works

Manage your files using REST API directly or with an API client.

#### cURL

```bash
curl "https://api.uploadcare.com/files/" \
     -H "Accept: application/vnd.uploadcare-v0.7+json" \
     -H "Authorization: Uploadcare.Simple UPLOADCARE_PUBLIC_KEY:UPLOADCARE_SECRET_KEY"
```

#### JavaScript

```js
import { listOfFiles, paginate } from '@uploadcare/rest-client'

const uploadcareSimpleAuthSchema = new UploadcareSimpleAuthSchema({
  publicKey: 'YOUR_PUBLIC_KEY',
  secretKey: 'YOUR_SECRET_KEY'
})

const paginatedListOfFiles = paginate(listOfFiles)
const pages = paginatedListOfFiles(
  {},
  { authSchema: uploadcareSimpleAuthSchema }
)

for await (const page of pages) {
  for (const file of page.results) {
    console.log(`URL: ${file.url}`)
  }
}
```

#### PHP

```php
<?php
$configuration = Uploadcare\Configuration::create((string) $_ENV['UPLOADCARE_PUBLIC_KEY'], (string) $_ENV['UPLOADCARE_SECRET_KEY']);

$api = (new Uploadcare\Api($configuration))->file();
$list = $api->listFiles();
foreach ($list->getResults() as $result) {
    echo \sprintf('URL: %s', $result->getUrl());
}
while (($next = $api->nextPage($list)) !== null) {
    foreach ($next->getResults() as $result) {
        echo \sprintf('URL: %s', $result->getUrl());
    }
}
```

#### Python

```python
from pyuploadcare import Uploadcare
uploadcare = Uploadcare(public_key='YOUR_PUBLIC_KEY', secret_key='YOUR_SECRET_KEY')

files = uploadcare.list_files(stored=True, limit=10)
for file in files:
    print(file.info)
```

#### Ruby

```ruby
require 'uploadcare'
Uploadcare.config.public_key = "YOUR_PUBLIC_KEY"
Uploadcare.config.secret_key = "YOUR_SECRET_KEY"

list = Uploadcare::FileList.file_list(stored: true, removed: false, limit: 100)
list.each { |file| puts file.inspect }
```

#### Swift

```swift
import Uploadcare

let uploadcare = Uploadcare(withPublicKey: "YOUR_PUBLIC_KEY", secretKey: "YOUR_SECRET_KEY")

let query = PaginationQuery()
  .stored(true)
  .ordering(.dateTimeUploadedDESC)
  .limit(10)
var list = uploadcare.listOfFiles()

try await list.get(withQuery: query)
print(list)
```

#### Kotlin

```kotlin
import com.uploadcare.android.library.api.UploadcareClient

val uploadcare = UploadcareClient(publicKey = "YOUR_PUBLIC_KEY", secretKey = "YOUR_SECRET_KEY")

val filesQueryBuilder = uploadcare.getFiles()
val files = filesQueryBuilder
    .stored(true)
    .ordering(Order.UPLOAD_TIME_DESC)
    .asList()
Log.d("TAG", files.toString())
```

## Table of Contents \[#toc]

| Article                                                       | Description                                                                                                                                                  |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Managing files](/docs/managing-files/)                       | Uploadcare provides various methods for managing already uploaded files with its REST API                                                                    |
| [Webhooks](/docs/webhooks/)                                   | Setup webhooks to notify your application about certain events that occur in your project asynchronously                                                     |
| [File metadata](/docs/file-metadata/)                         | File metadata is additional, arbitrary key-value data associated with uploaded files. For example, you could store a unique file identifier from your system |
| [File tags](/docs/file-tags/)                                 | Attach an ordered list of string tags to files at upload time or via the REST API, and use them as a filter in file search                                   |
| [AWS S3 integration](/docs/s3-integration/)                   | Connect an AWS S3 bucket to one or more of your Uploadcare projects to implement custom file workflows, integrated deeply into your system                   |
| [Storage backups](/docs/backup-to-s3-bucket/)                 | Automatically copy all of you stored files to a custom S3 bucket. Connect the storage once, and the system will do backups on a timely basis                 |
| [Video processing](/docs/transformations/video-encoding/)     | Encode video files to MP4, WEBM, or OGG, and transform them to adjust the viewing experience, create thumbnails, and save bandwidth                          |
| [Document conversion](/docs/transformations/file-conversion/) | Convert documents and create their thumbnails to improve user experience                                                                                     |
| [Unsafe content moderation](/docs/unsafe-content/)            | Detect and identify inappropriate, unwanted, NSFW, or offensive user-generated content                                                                       |
| [Object recognition](/docs/object-recognition/)               | Categorize and tag people, objects, and other content classes in your images                                                                                 |
| [Malware protection](/docs/security/malware-protection/)      | Automatically detect infected or malicious files to protect your users                                                                                       |
| [REST API](https://uploadcare.com/docs/api/rest/)             | Low-level access to Uploadcare features, e.g. CRUD files and their metadata, receive webhooks, and run add-ons                                               |
| [API integrations](/docs/integrations/)                       | You don't have to code most of the low-level API integrations. We have high-level libraries for all popular platforms                                        |