POST /api/v1/imagesMultipart field file; optional visibility and folderId.
Upload, organize, and share files from the website or connect an app with the GhostCodes upload API.
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.
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.
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.
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.
POST /api/v1/imagesMultipart field file; optional visibility and folderId.
POST /api/v1/videosMultipart field video; optional visibility and folderId.
GET /api/v1/foldersList folders owned by the API key’s account.
POST /api/v1/foldersCreate a private folder using JSON: { "name": "Screenshots" }.
PATCH /api/v1/folders/:idRename a folder or change its visibility.
GET /api/v1/uploadsList owned uploads. Supports limit, cursor, and folderId.
PATCH /api/v1/uploads/:type/:idChange an upload’s visibility or move it into an owned folder.
DELETE /api/v1/uploads/:type/:idDelete 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.