cURL
curl --request POST \ --url https://api.tightknit.dev/admin/v0/files \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form 'file={}' \ --form filename=otter.png \ --form 'description=This is a picture of an otter' \ --form size=1024
{ "success": true, "data": { "id": "12345678-90ab-cdef-1234-567890ab", "created_at": "2024-02-01 04:04:39.198523+00", "name": "my-file.png", "title": "My File", "size": 1024, "mimetype": "image/png", "url": "https://example.com/my-file.png" } }
Upload and create a new public File in Tightknit storage
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
File uploaded successfully
The response is of type object.
object
Was this page helpful?