Files
Redirect to a public file's content
Unauthenticated. Only serves files with isPublic=true whose upload has been confirmed and whose virus scan came back clean - Cloudflare R2 has no per-object ACL, so this route (not the storage bucket) is what actually decides whether a "public" file's bytes are reachable. 302-redirects to a fresh, short-lived (60s) signed GET url so the actual bytes are still served straight off Cloudflare's edge.
GET
/api/files/public/{fileId}SDK setup
Create a client instance. No authentication is required for this endpoint.
import { Configuration, FilesApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
});
const files = new FilesApi(configuration);import { Configuration, FilesApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
});
const files = new FilesApi(configuration);Example request
Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.
const { data: result } = await files.request("file_OjZnA2DhCFfwTysk");const { data: result } = await files.request("file_OjZnA2DhCFfwTysk");Playground
liveTest this endpoint with your own credentials. Your requests will be sent to the live API.
No Request Yet
Send a request to see the full inspector
Authentication
Public — No Auth Required
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | — |
Responses
302Redirect to a short-lived signed download URL
403File is not public
404File not found, or not yet confirmed/scanned
Errors
| Code | Meaning |
|---|---|
403 | File is not public |
404 | File not found, or not yet confirmed/scanned |