Specifies if the file is available publicly without authentication. If this value is true, the permalink and cdn links in the _links section contain the public URLs. The cdn link is served from a cache and accepts the imageSize query parameter for images. If the organization has a verified media domain with no verification failure, the cdn link uses that domain. For more information, see Configure a custom domain.
Creates a file.
Additionally, a file can be sent by:
- Multipart/form-data POST request: In this request, the file is uploaded and all property names are the same as the JSON names.
- File body request: In this request, the file body is sent as the request body, with the appropriate
Content-Type. No additional properties can be set with the request data.
Permitted file types: .jpg, .png, .gif, .webp, .svg, and .pdf. Scripts, event handlers, and references to external files are removed from an SVG file before it is stored.
When using a publishable API key, only private files can be created. The files can be modified at a later point or time, or can be accessed using a secret API key.
- Mock serverhttps://www.rebilly.com/_mock/catalog/all/files
- Sandbox serverhttps://api-sandbox.rebilly.com/organizations/{organizationId}/files
- Live serverhttps://api.rebilly.com/organizations/{organizationId}/files
curl -i -X POST \
https://www.rebilly.com/_mock/catalog/all/files \
-H 'Content-Type: application/json' \
-H 'REB-APIKEY: YOUR_API_KEY_HERE' \
-d '{
"file": "R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=",
"isPublic": false,
"name": "logo.png",
"description": "My file description",
"sourceType": "upload",
"tags": [
"test",
"tags"
]
}'Maximum number of requests available at one time for this rate limit. For more information, see Rate limits.
Number of requests still available for this rate limit. For more information, see Rate limits.
{ "FileSize": 120, "Software": "GIMP 2.4.5" }
Specifies if the file is available publicly without authentication. If this value is true, the permalink and cdn links in the _links section contain the public URLs. The cdn link is served from a cache and accepts the imageSize query parameter for images. If the organization has a verified media domain with no verification failure, the cdn link uses that domain. For more information, see Configure a custom domain.
{ "id": "file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N", "name": "string", "extension": "string", "description": "string", "sourceType": "upload", "tags": [ "string" ], "mime": "image/png", "size": 0, "width": 0, "height": 0, "sha1": "string", "exifData": { "FileSize": 120, "Software": "GIMP 2.4.5" }, "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "isPublic": true, "_links": [ { … } ] }