Official Plugins (Kuzzle v2.x)
S3 v2.x

getUrl #

Returns a Presigned URL to upload directly to S3.
The URL expires after a configurable TTL. (Configurable in the kuzzlerc file)

File uploaded to the generated URL must be validated with upload:validate otherwise they will be deleted after the same TTL as for the URL expiration.

Query Syntax #


Copied to clipboard!
URL: http://kuzzle:7512/_plugin/s3/upload
Method: GET

Other protocols #

Copied to clipboard!
  "controller": "s3/upload",
  "action": "getUrl",

  "filename": "headcrab.png", 
  "uploadDir": "xen" 

Arguments #

  • filename: Uploaded file name
  • uploadDir: Upload directory (see s3 file key)

Response #

Returns an object with the following properties:

  • fileKey: file key in S3 bucket
  • uploadUrl: presigned upload URL
  • fileUrl: public file URL after successful upload
  • ttl: TTL in ms for the URL validity and before the uploaded file deletion
Copied to clipboard!
  "status": 200,
  "error": null,
  "controller": "s3/upload",
  "action": "getUrl",
  "requestId": "<unique request identifier>",
  "result": {
    "fileKey": "xen/<uuid>-headcrab.png", 
    "uploadUrl": "", 
    "fileUrl": "", 
    "ttl": 1200000 

Possible errors #