Upload Graphic
POST {{baseUrl}}/libraries/:libraryId/graphics
Upload a new graphic to a library. <!--From Readme--> The content type for this API call must be multipart/form-data.
The following table shows the allowed content-types for the graphics file:
File Type | Content Type |
---|---|
jpeg | image/jpeg |
gif | image/gif |
png | image/png |
Use of Graphic in Product
Notice: Uploaded files may be attached to surveys and can be accessed by anyone who has the corresponding URL. This feature should only be used for non-confidential files.
Try It Out Feature Limitation
Unfortunately, this feature will not let you upload files. To test this feature, it's suggested you run the cURL example.
You can upload a file from a remote host, or you can upload a file from your local drive.
Example request body for uploading file from a remote host:
JSON
{
"name": "imageName",
"fileUrl": "https://fileLocation.com/imageName.png",
"contentType": "contentType",
"folder": "libraryFolderName"
}
Example request body for uploading file from a local drive:
```JSON
{
file
: @/home/images/imageName.png
,
folder
: libraryFolderName
}
Request Body
[{"name"=>"name", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"fileUrl", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"contentType", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"folder", "value"=>"<string>", "datatype"=>"string"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"result":{"id":"\u003cstring\u003e"},"meta":{"httpStatus":"\u003cstring\u003e","requestId":"\u003cstring\u003e","notice":"\u003cstring\u003e"}}