Files uploads

Открыть загрузку файла

Changed on

Ответ содержит план частей: файл любого размера грузится кусками, а обрыв стоит одной части. Относительный путь превращается в дерево папок до первого байта.

post/api/v1/files/uploads

Request

  • Base URL
    https://erp.akeda.ru
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://erp.akeda.ru/oauth2/authorize
      Token URLhttps://erp.akeda.ru/oauth2/token
      Scopesakeda:delegate

Headers

X-Tenant, string required

Slug выбранного кабинета; кабинет не является юрлицом

Request body

FilesUploadInput required
folder_id, string uuid required
file_id, string uuid

Задан при загрузке новой версии существующего файла

name, string required
relative_path, string

Путь файла внутри загружаемой папки; недостающие папки создаются по нему

mime_type, string
size_bytes, integer required
comment, string

Response

Сессия загрузки

FilesUpload required
id, string uuid required
folder_id, string uuid required
root_id, string uuid required
file_id, string uuid
name, string required
mime_type, string required
size_bytes, integer required
part_bytes, integer required
part_count, integer required
status, 'pending' | 'uploading' | 'completed' | 'failed' | 'aborted' required
error_code, string
expires_at, string date-time required
created_at, string date-time required
uploaded, FilesUploadedPart[]

Уже принятые части; на них держится докачка

direct_urls, object

Подписанные адреса частей для прямой записи в объектное хранилище

Changes

    • info

      added the optional property field to the response with the status

    • info

      added the optional property field to the response with the status

    • info

      added the optional property field to the response with the status

    3 more changes in this revision