Guide

Move from Uploadcare to Fileboy

Map Uploadcare's CDN operations to Fileboy transforms, import your project with a script, swap the uploader and cut over.

Migration guide · in this guide

  • What moves, and what does not
  • 1. Map your URLs
  • 2. Import your files
  • 3. Write down the new IDs, and swap the uploader
  • 4. Check the import

Published

What moves, and what does not

Uploadcare and Fileboy solve the same core problem, so moving is mostly mechanical: copy your files, change the URLs, and swap the uploader. The comparison is even-handed about where Uploadcare is the better fit: a polished uploader interface, files from cloud storage and social accounts, and more add-on services.

Check your file count and storage against the plan you want on the pricing page first. Uploads past an app's file or storage limit are refused, and nothing is stored.

1. Map your URLs

Uploadcare puts operations in the path of the file's URL, each after /-/. Fileboy has /images/get/FILE_ID and puts steps after ?transform=, separated by semicolons.

  • /-/resize/400x/ becomes resize:400x_.
  • /-/scale_crop/400x300/ becomes resize:400x300~fit:cover. Roughly: Uploadcare's alignment options and Fileboy's position option differ.
  • /-/format/webp/ becomes format:webp, and /-/format/auto/ becomes format:auto.
  • /-/quality/lighter/ becomes quality:70. Roughly: Uploadcare's named levels have no exact number, so choose one and compare.
The same image, before and after
https://ucarecdn.com/FILE_UUID/-/scale_crop/400x300/-/format/auto/

https://api.fileboy.io/images/get/FILE_ID?transform=resize:400x300~fit:cover;format:auto

Operations not listed here need checking by hand. The transform reference lists everything Fileboy can do to an image.

2. Import your files

The script pages through Uploadcare's REST API and asks Fileboy to fetch each file from its original URL with uploadFileFromUrl, writing the Uploadcare UUID into the file's metadata. A second run skips what is already in.

import-from-uploadcare.mjs
import { Fileboy } from "@cd2/fileboy-node"

const fileboy = Fileboy({
  publicKey: process.env.FILEBOY_PUBLIC_KEY,
  privateKey: process.env.FILEBOY_PRIVATE_KEY,
})
const headers = {
  Authorization: "Uploadcare.Simple " + process.env.UPLOADCARE_PUBLIC_KEY + ":" + process.env.UPLOADCARE_SECRET_KEY,
  Accept: "application/vnd.uploadcare-v0.7+json",
}

const failed = []
let next = "https://api.uploadcare.com/files/?limit=100"
while (next) {
  const res = await fetch(next, { headers })
  if (!res.ok) throw new Error("Uploadcare answered " + res.status + ": " + (await res.text()))
  const page = await res.json()

  for (const item of page.results) {
    try {
      const done = await fileboy.listFiles({ metadata: { uploadcareId: item.uuid }, limit: 1 })
      if (done.data.length > 0) continue

      const file = await fileboy.uploadFileFromUrl(item.original_file_url, {
        name: item.original_filename,
        metadata: { uploadcareId: item.uuid },
      })

      if (file.fileSize !== item.size) {
        console.warn("Size differs for " + item.uuid, file.fileSize, item.size)
      }
    } catch (error) {
      failed.push(item.uuid)
      console.error(item.uuid, error.message)
    }
  }
  next = page.next
}

console.log("Failed: " + failed.length, failed)

A sketch to adapt. The Fileboy calls are the library's. For Uploadcare's REST API, check its documentation for the current version, header and field names, and for how its files are served if you use secure delivery. Try it on a handful of files first. Fileboy fetches each address itself, so it must be reachable from the public internet.

3. Write down the new IDs, and swap the uploader

export-map.mjs
import { writeFile } from "node:fs/promises"
import { Fileboy } from "@cd2/fileboy-node"

const fileboy = Fileboy({
  publicKey: process.env.FILEBOY_PUBLIC_KEY,
  privateKey: process.env.FILEBOY_PRIVATE_KEY,
})

// Fileboy kept the old id in each file's metadata, so it can write the map for you
const map = {}
let cursor
do {
  const page = await fileboy.listFiles({ hasMetadata: ["uploadcareId"], limit: 100, cursor })
  for (const file of page.data) map[file.metadata.uploadcareId] = file.id
  cursor = page.nextCursor ?? undefined
} while (cursor)

await writeFile("uploadcare-map.json", JSON.stringify(map, null, 2))
console.log(Object.keys(map).length + " files in the map")

Add a column for the Fileboy ID and fill it from the map. For new uploads, replace Uploadcare's widget with Fileboy's: there is a drop-in uploader for React, Vue and Svelte. It returns a file ID to store instead of a UUID, and a project that uses a custom interface can call the upload API directly. Large files go up in parts and carry on after a dropped connection.

import { FileboyProvider, FileUploader } from "@cd2/fileboy-react"

export function Avatar({ onChange }: { onChange(fileboyId: string): void }) {
  return (
    <FileboyProvider publicKey="YOUR_PUBLIC_KEY">
      <FileUploader allow="image/*" onFileUploaded={file => onChange(file.id)} />
    </FileboyProvider>
  )
}

4. Check the import

  • Count: the map's entries should equal the files in your Uploadcare project. Re-run the import: it should report nothing new and an empty Failed list.
  • Sizes: look at every size warning the script printed.
  • Pictures: open a sample at the sizes your pages use, including any that used an operation you had to map by hand.
  • Groups: if you used Uploadcare file groups, rebuild them in your own database from the IDs, as Fileboy files are single.

5. Cut over

  • Set your Fileboy app's allowed origins and keep the private key on your server.
  • Match privacy: if you used Uploadcare's secure delivery, turn on signed URLs for the Fileboy app.
  • Swap the uploader first, so new files go to Fileboy. Then re-run the import for what arrived meanwhile.
  • Change the URL builder, on one page first, and compare it with the old page.
  • Keep the Uploadcare project for a few weeks. Remove files only when your logs show no more traffic, and keep a copy of the map.

Checked against the current libraries in November 2026. Found something that no longer works? Tell us.

Still choosing a tool?

Fileboy is small on purpose. This comparison says where it fits and where another option is the better call.

Get a key and run this code

Create a free app, copy your keys into the example and run it. The free plan needs no card.