Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
blocks:api:upload [2023-03-04 11:02]
admin typo
blocks:api:upload [2023-04-24 07:12] (current)
admin [File Upload API]
Line 1: Line 1:
 ====== File Upload API ====== ====== File Upload API ======
-Blocks provides an HTTP API for uploading files, for example images. Uploaded files are temporarily stored in a subdirectory of the //temp// directory inside your Blocks root directory, and should then be moved or further processed by a script. As an example, [[blocks:app-note:publishphoto|this application note]] describes how to upload photos subsequently shown on a Display Spot. +Blocks provides an HTTP API for uploading files, for example images. Uploaded files are temporarily stored in a subdirectory of the //temp// directory inside your Blocks root directory. This directory is not externally accessible for reading data. Thusuploaded files must then be moved or further processed by a script. As an example, [[blocks:app-note:publishphoto|this application note]] describes how to upload photos subsequently shown on a Display Spot. 
  
 +:!: **IMPORTANT**: Unless explicitly protected by an //upload// API key and value in the [[blocks: server_configuration_file|configuration file]], uploads are not restricted in any other way. If an //upload// is specified, all upload requests must add an //apiKey// query parameter to the URL, with the expected value, or the upload will be rejected.
 ===== Upload file using multipart/form-data ===== ===== Upload file using multipart/form-data =====
 **URL:** /rest/upload/multipart **URL:** /rest/upload/multipart