HomePhabricator
Diffusion Comm 82ad20c82fd8

[backup] Introduce upload endpoint

Description

[backup] Introduce upload endpoint

Summary:
ENG-4501

Endpoint for uploading the backups.

Depends on D8962

Test Plan:
Make a request:

POST http://127.0.0.1:50052/backups
Content-Type: multipart/form-data; boundary=bound
Authorization: Bearer eyJ1c2VySUQiOiAiMSIsICJhY2Nlc3NUb2tlbiI6ICIyIiwgImRldmljZUlEIjogIjMifQ==

--bound
Content-Disposition: form-data; name="backup_id"

id7
--bound
Content-Disposition: form-data; name="user_keys_hash"

keys_hash7
--bound
Content-Disposition: form-data; name="user_keys"
Content-Type: application/octet-stream

keys7
--bound
Content-Disposition: form-data; name="user_data_hash"

data_hash7
--bound
Content-Disposition: form-data; name="user_data"
Content-Type: application/octet-stream

data7
--bound
Content-Disposition: form-data; name="attachments"

a7-1
a7-2
a7-3
--bound--
  • checked that there is a new backup row in dynamodb
  • checked that there are 2 blobs in dynamodb

Reviewers: bartek, patryk, kamil, jon

Reviewed By: bartek

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D8963

Details

Provenance
Michal Gniadek <michal.gniadek@swmansion.com>Authored on Aug 16 2023, 6:49 AM
Reviewer
bartek
Differential Revision
D8963: [backup] Introduce upload endpoint
Parents
rCOMM3c1ce0afaf0f: [backup] Update `BlobItem`
Branches
Unknown
Tags
Unknown