Přeskočit na hlavní obsah

Content Manager - Files

File overview

File represents a virtual file info

Key features

File metadata

  • Name is an optional file name to override the original file name
  • SharingType is the enum to determine allowed sharing type:
    • Public - anonymous access to file content
    • AnyoneWithLink - URL token based access to file content
    • Restricted - authenticated and authorized access

HowTo

  • Use FileUpload to upload file to uploaded file/blob
  • Use Files/{uploadId} to create file info to uploaded file/blob

HowTo store any file

  1. Choose target folder (GET /api/v1/Folders or GET /api/v1/Folders/Search), use appropriate storage access
  2. Upload physical file (POST /api/v1/FileUpload)
  3. Create a new file definition and combine with uploaded file (POST /api/v1/Files/{uploadId}), use the same storage access
  4. Use authenticated endpoints to get file-content (GET /api/v1/Files/{id} or GET /api/v1/Files/Path/{path}), use the same storage access as before

HowTo store a file with anonymous access

  1. Choose target folder (GET /api/v1/Folders or GET /api/v1/Folders/Search), use Public access
  2. Upload physical file (POST /api/v1/FileUpload)
  3. Create a new file definition and combine with uploaded file (POST /api/v1/Files/{uploadId}), use Public access again and set SharingType property to Public
  4. Use anonymous endpoints to get file-content (GET /api/v1/PublicFiles/{id} or GET /api/v1/PublicFiles/Path/{path})

HowTo update an existing file

  1. Search given file (GET /api/v1/Folders/{id}/Files or GET /api/v1/Files/Search), use approprate storage access
  2. Delete existing file (DELETE /api/v1/Files/{id}), use the same storage access
  3. Upload physical file (POST /api/v1/FileUpload)
  4. Create a new file definition again (POST /api/v1/Files/{uploadId}), use the same storage access