Work.upload.commit

From Safe Creative API
Revision as of 13:01, 5 May 2010 by w>Jguillo (Created page with 'Ends an upload-by-chunk process. You must send the SHA-1 hash of the uploaded file to checksum the upload. This component must be called on an upload API server returned by [[wo…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Ends an upload-by-chunk process. You must send the SHA-1 hash of the uploaded file to checksum the upload.

This component must be called on an upload API server returned by work.upload.lookup.

This components returns an uploadticket to be used on other components like work.register.

Info

  • Component name: work.upload.commit
  • Signature: Requires signature using the authkey's private key
  • Timestamp: Requires ztime parameter
  • Authorization level: ADD

Parameters

  • authkey*: Authorization key of the work owner
  • ztime*: Z-Timestamp
  • uploadid*: Upload ID obtained from work.upload.lookup
  • length*: Uploaded file size
  • checksum*: Uploaded file SHA-1 hash

* Required parameter

Returns

  • workuploadcommit
    • uploadticket: Upload ticket

Sample

REQUEST:

https://upload01.safecreative.org/v2/
?component=work.upload.chunk
&authkey=1i5g2aaf2bz09lyo867cuimqg
&data=VmVyeSBsb25nIGZpbGU%3D
&offset=0
&uploadid=3c33a96c-7743-43d0-9614-db70fa46d3ad
&ztime=1271749837035
&signature=f53cf9e21778719e599f6ad39bd85924ecb0bc23

RESPONSE:

<?xml version="1.0" encoding="UTF-8"?>
<workuploadcommit>
  <uploadticket>HvWIbGj7anAW8Nm6LoroakJAPHUjtW_CcZMI8QUOQ1jV2lkRW-jU27ukjPxRvTKk2bL0rOuFow2yiJtmLSvK_9iXZzC_c1CkcJYOSb0Kq8XOzk_CovkO4cfzzNa9NouQVeYoyO6UAXod9xI05wGlboss2jDrN974Z5qgSIjVTLtxDg1mdUFevdbdJXoJr_8T6NJEk3ZnlBXxgq3eEz7NvjvDKp_TDBWuj0UaUOJe_PtcMO0sHrZ5GIfM0yTPHSNE</uploadticket>
</workuploadcommit>