Benoit Tellier created JAMES-3373:
-------------------------------------

             Summary: Implement JMAP downloads
                 Key: JAMES-3373
                 URL: https://issues.apache.org/jira/browse/JAMES-3373
             Project: James Server
          Issue Type: New Feature
          Components: JMAP
            Reporter: Benoit Tellier
            Assignee: Antoine Duprat


Regarding the JMAP specifications concerning downloading blobs : 
https://jmap.io/spec-core.html#downloading-binary-data 

The JMAP draft version already manages the download of attachments and full 
messages, thus: 

* Port download route from JMAP draft version.
* Make sure it works for full message and attachment
* Handle error:
  + Failed to Authenticate
  + No right to download
  + Resources not found
  + Parameters missing or wrong format

We need as well to propose an URL including the following parameters:

* **accountId**: The id of the account to which the record with the blobId 
belongs
* **blobId**: The blobId representing the data of the file to download
* **type**: The type for the server to set in the Content-Type header of the 
response; the blobId only represents the binary data and does not have a 
content-type innately associated with it
* **name**: The name for the file; the server MUST return this as the filename 
if it sets a Content-Disposition header

A proposed URL would be: `/download/$accountId/$blobId/?type=$type&name=$name`

DOD:
- Make sure it work for download full message or attachment
- Write integration test
- Update the session object with the new download URL



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to