File Upload Service

This service accepts one uploaded file and returns a public URL.

Rule

Endpoint

POST https://hello-world.dev.myapp.fund/api/files

Content type: multipart/form-data

Fields:

Create New URL

curl -X POST https://hello-world.dev.myapp.fund/api/files \
  -F file=@./asset.png

Expected response:

{
  "name": "generated-name",
  "url": "https://hello-world.dev.myapp.fund/files/generated-name",
  "updated": false,
  "size": 1234,
  "content_type": "image/png",
  "original_filename": "asset.png"
}

Update Existing URL

curl -X POST https://hello-world.dev.myapp.fund/api/files \
  -F name=landing-logo \
  -F file=@./asset.png

Expected response:

{
  "name": "landing-logo",
  "url": "https://hello-world.dev.myapp.fund/files/landing-logo",
  "updated": true,
  "size": 1234,
  "content_type": "image/png",
  "original_filename": "asset.png"
}

Read Metadata

GET https://hello-world.dev.myapp.fund/api/files/<name>

Fetch File

GET https://hello-world.dev.myapp.fund/files/<name>