MutacjaBetaMutation.completeFileUpload
Confirms that the content of a file started with initiateFileUpload was sent. Prynt checks the stored size, marks the file completed and attaches it to its record. A file of a product still in prepress (NO_FILES, FILES_TO_CHECK, WAITING_FOR_ADMIN_RESPONSE, WAITING_FOR_CLIENT_RESPONSE, FILES_ACCEPTED) moves the product to FILES_TO_CHECK and its files back to checking: a new file on a product with accepted files cancels the acceptance. A product already in production or further keeps its status. Only the integration that started the upload may complete it, once.
| Wymagany zakres | files:write |
|---|---|
| Dostępne od | Prynt 0.28.0 |
| Stabilność | Beta (co to znaczy) |
| Ponawianie | Wysyłaj nagłówek Idempotency-Key, żeby ponowienie nie wykonało zapisu drugi raz. Zapisy i idempotencja |
Argumenty
| Nazwa | Typ | Opis |
|---|---|---|
inputwymagane | CompleteUploadInput! | The file whose upload to complete. |
Zwraca
File!
Przykład
mutation CompleteUpload($input: CompleteUploadInput!) { completeFileUpload(input: $input) { id originalFilename sizeBytes uploadStatus verificationStatus }}{ "input": { "fileId": "e18da4c5-7092-4db4-8fd0-5b6c7d8e9fa7" }}IDEMPOTENCY_KEY=$(uuidgen) # ponawiaj z tym samym kluczem
curl -sS https://twoja-drukarnia.prynt.pl/api/v1/graphql \ -H "Authorization: Bearer $PRYNT_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $IDEMPOTENCY_KEY" \ --data-binary @- <<'JSON'{ "query": "mutation CompleteUpload($input: CompleteUploadInput!) {\n completeFileUpload(input: $input) {\n id\n originalFilename\n sizeBytes\n uploadStatus\n verificationStatus\n }\n}", "variables": { "input": { "fileId": "e18da4c5-7092-4db4-8fd0-5b6c7d8e9fa7" } }}JSON{ "data": { "completeFileUpload": { "id": "e18da4c5-7092-4db4-8fd0-5b6c7d8e9fa7", "originalFilename": "ulotka-a5.pdf", "sizeBytes": "2457600", "uploadStatus": "COMPLETED", "verificationStatus": "TO_CHECK" } }}