> 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 uploading with Uploadcare

> Uploadcare provides Upload API and powerful file uploaders for your website or app with no hassle.

You can upload any file type, from almost any source, using a variety of upload options

* Built-in storage and CDN
* Uploading acceleration network
* Multipart uploading up to 5 TB per file
* File analysis and moderation
* Authenticated uploading process
* Unlimited scalability on demand
* API clients for popular platforms

Upload files from almost any source using API or beautiful UI file uploaders.
Receive and store: user-generated content, programmatically uploaded media,
large files to be later optimized, etc.

Once uploaded, files become instantly accessible on our CDN via their unique
and unguessable URLs. [Deliver](/docs/delivery/) them with the set of image
optimization and transformation operations, or [manage](/docs/start/file-management/) via REST API.

If your team manages its own infrastructure, see [Storage](/docs/uploads/storage/) for options to use Amazon S3, Cloudflare R2, Google Cloud Storage, or Azure Blob Storage with Uploadcare.

## File Uploader

Integrate our customizable uploading widget that provides a ton of features
and works in all modern browsers:

![](https://ucarecdn.com/52bc2490-d7df-40fd-b18c-3adc000c192d/-/preview/)

Our web and mobile uploading widgets:

* [File Uploader](/docs/file-uploader/): our flagship uploader
* [jQuery File Uploader](/docs/uploads/file-uploader/)
* [iOS uploading widget](/docs/integrations/swift/)
* [Android uploading widget](/docs/integrations/android/)

**Uploading with JavaScript SDK**

If you need to build your own uploading solution and don't want to use
[File Uploader](/docs/file-uploader/), one of the options is to use our JS SDK.
[Upload Client](https://github.com/uploadcare/uploadcare-js-api-clients/blob/master/packages/upload-client/README.md) works with both Node.js and browsers.

**Uploading on Mobile (iOS & Android)**

Both [Swift](/docs/integrations/swift/) and [Kotlin](/docs/integrations/android/) integrations
have not only uploaded API methods but include uploading widgets for iOS and Android.
They allow to:

* Upload files from a local disk, camera, and cloud sources.
* Upload multiple files at once.
* Track, pause and continue multipart uploading.
* Upload in the background.

## Uploading with API

Build custom uploading flow using Upload API directly or with an API client.

#### cURL

```bash
curl -F "UPLOADCARE_PUB_KEY=demopublickey" \
     -F "file=@sample-image.jpeg" \
     "https://upload.uploadcare.com/base/"
```

#### JavaScript

```js
import { uploadFile } from '@uploadcare/upload-client'

// fileData must be `Blob`, `File`, `Buffer`, UUID, CDN URL or Remote URL
const result = await uploadFile(fileData, {
  publicKey: 'YOUR_PUBLIC_KEY',
  store: 'auto',
  metadata: {
    subsystem: 'uploader',
    pet: 'cat'
  }
})
console.log(`URL: ${file.cdnUrl}`)
```

#### PHP

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

$uploader = new Uploadcare\Uploader\Uploader($configuration);
$fileInfo = $uploader->fromPath(__DIR__ . '/squirrel.jpg', null, null, '1', [
    'system' => 'php-uploader',
    'pet' => 'cat',
]);
echo \sprintf("URL: %s, ID: %s, Mime type: %s\n", $fileInfo->getUrl(), $fileInfo->getUuid(), $fileInfo->getMimeType());
foreach ($fileInfo->getMetadata() as $key => $value) {
    echo \sprintf("%s: %s\n", $key, $value);
}
```

#### Python

```python
from pyuploadcare import Uploadcare, File

uploadcare = Uploadcare(public_key='YOUR_PUBLIC_KEY', secret_key='YOUR_SECRET_KEY')
with open('test1.txt', 'rb') as file_object:
    ucare_file = uploadcare.upload(file_object)
```

#### Ruby

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

source_file = File.open('image.png')
uploaded_file = Uploadcare::Uploader.upload(source_file, store: true)
```

#### Swift

```swift
import Uploadcare

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

guard let url = Bundle.main.url(forResource: "squirrel", withExtension: "jpg"),
      let data = try? Data(contentsOf: url) else { return }
let metadata = ["subsystem": "uploader", "pet": "cat"]
let file = try await uploadcare.uploadFile(data, withName: "random_file_name.jpg", store: .auto) { progress in
  print("progress: \(progress)")
}
prkint(file)
```

#### Kotlin

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

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

val metadata = uploadcare.getFileMetadata(fileId = "1bac376c-aa7e-4356-861b-dd2657b5bfd2")
Log.d("TAG", metadata.toString())
```

Check out our guide to the various methods of [uploading files](/docs/uploading-files/)
and available integrations.

## Proxy

It is the best and simplest way to retrieve files from existing remote locations
and deliver them using our CDN.

```
https://endpoint.ucr.io/ + https://yoursite.com/assets/image.jpg =
https://endpoint.ucr.io/https://yoursite.com/assets/image.jpg
```

Learn more about [Proxy](/docs/delivery/proxy/).

## Table of Contents \[#toc]

| Article                                                         | Description                                                                                                                                             |
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Uploading files](/docs/uploading-files/)                       | Upload media files with various options. Whether you need to accept user-generated content or serve media on your website or app, we've got you covered |
| [File Uploader](/docs/file-uploader/)                           | Open source, responsive and mobile-ready web solution that allows users to select and upload multiple files from various sources                        |
| [Storage options](/docs/uploads/storage/#file-storing-behavior) | Uploadcare storage requires no configuration and works out of the box. Learn about file storing behavior                                                |
| [Signed uploads](/docs/security/secure-uploads/)                | Get to control who can and when can upload files to one of your Uploadcare projects                                                                     |
| [File analysis on upload](/docs/file-analysis/)                 | We extract a ton of helpful information about file that you can use to your benefit                                                                     |
| [Validation and moderation](/docs/moderation/)                  | You can validate the types of files you want to accept, and apply various checks after                                                                  |
| [Upload API](https://uploadcare.com/docs/api/upload/)           | Low-level access to provide several ways of uploading files to Uploadcare servers in a secure and reliable way                                          |
| [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                                   |