Help and developer guide

File Uploader docs

Upload, organize, and share files from the website or connect an app with the GhostCodes upload API.

For members

Upload from the website

  1. Sign in with Discord, then open Your files.
  2. Create or choose a folder before uploading. Image batches support up to 20 files, with a 10 MB limit per image.
  3. Use the selection preview and progress bar to check the batch. Videos can be up to 100 MB each.
  4. Choose Private or Public. Public files appear only when both the file and its folder are public.

Folder cards let you rename a folder, make it the default destination, or delete it. Deleting a non-default folder moves its images and videos to your default folder, so the uploads are kept.

Visibility

Folders and privacy

Folders start private. A public folder can appear in the Gallery, but each file still needs Public visibility to be shown. Private folders and files are visible only to their owner and site administrators.

Copy a folder ID from the upload page when an API client needs to place files in that folder.

For app developers

Create an API application

  1. Sign in, then open API applications.
  2. Create a named application, choose its default folder and visibility, then copy the secret. The full secret is shown only once.
  3. Store it as a server-side environment variable. Never put it in browser JavaScript or commit it to source control.
  4. Send it in the Authorization: Bearer YOUR_API_KEY request header.

Each application has independent settings and can be renamed, reconfigured, or revoked. Its default folder and visibility apply when an upload request omits those fields.

Keep secrets safe. Revoke an application from the API applications page if its secret is exposed or no longer needed.
Node.js

Use the Node client

Install the published client or use the source in sdk/node while developing this repository.

npm install ghostcodes-uploader-client
const FileUploader = require('ghostcodes-uploader-client');

const uploader = new FileUploader({
  apiKey: process.env.GHOSTCODES_API_KEY,
  baseUrl: 'https://ghostimageuploader-de5a91b2dabe.herokuapp.com'
});

const result = await uploader.uploadImage('./screenshot.png', {
  visibility: 'private'
});
console.log(result.absoluteUrl);

For folders, video uploads, progress callbacks, pagination, and TypeScript, read the client’s sdk/node/README.md or the published npm package documentation.

HTTP API

Endpoints

POST /api/v1/images

Multipart field file; optional visibility and folderId.

POST /api/v1/videos

Multipart field video; optional visibility and folderId.

GET /api/v1/folders

List folders owned by the API key’s account.

POST /api/v1/folders

Create a private folder using JSON: { "name": "Screenshots" }.

PATCH /api/v1/folders/:id

Rename a folder or change its visibility.

GET /api/v1/uploads

List owned uploads. Supports limit, cursor, and folderId.

PATCH /api/v1/uploads/:type/:id

Change an upload’s visibility or move it into an owned folder.

DELETE /api/v1/uploads/:type/:id

Delete an owned image or video upload.

Image uploads are limited to 10 MB each. Video uploads are limited to 100 MB. Uploads are private by default. Use type=image or type=video for upload management routes.