You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Benoit Tellier (Jira)" <se...@james.apache.org> on 2021/04/12 09:57:00 UTC

[jira] [Updated] (JAMES-3432) Upload: Attachment

     [ https://issues.apache.org/jira/browse/JAMES-3432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benoit Tellier updated JAMES-3432:
----------------------------------
    Fix Version/s: 3.6.1

> Upload: Attachment
> ------------------
>
>                 Key: JAMES-3432
>                 URL: https://issues.apache.org/jira/browse/JAMES-3432
>             Project: James Server
>          Issue Type: Sub-task
>            Reporter: Nguyễn Việt Đức
>            Assignee: Benoit Tellier
>            Priority: Major
>             Fix For: 3.6.0, 3.6.1
>
>
> *Why*?
> User want to upload file/files for an account.
>  How?
> *Request*
>  To upload a file, the client submits an authenticated POST request to the file upload resource - which MUST contain a variable called accountId.
>  Sample: "https://jmap.example.com/upload/\{accountId}"
> *Response*
>  A successful request MUST return a single JSON object with the following properties as the response:
> {code:java}
> *accountId*: Id The id of the account used for the call.
> *blobId*: Id The id representing the binary data uploaded. The data for this id is immutable. The id only refers to the binary data, not any metadata.
> *type*: String The media type of the file (as specified in [@!RFC6838], Section 4.2) as set in the Content-Type header of the upload HTTP request.
> *size*: UnsignedInt The size of the file in octets.
> {code}
> *Note*
> If identical binary content to an existing blob in the account is uploaded, the existing blobId MAY be returned.
>  Clients should use the blobId returned in a timely manner. Under rare circumstances, the server may have deleted the blob before the client uses it; the client should keep a reference to the local file so it can upload it again in such a situation.
>  When an HTTP error response is returned to the client, the server SHOULD return a JSON “problem details” object as the response body, as per [@!RFC7807].
>  As access controls are often determined by the object holding the reference to a blob, unreferenced blobs MUST only be accessible to the uploader, even in shared accounts.
> *Definition of done*
> {code:java}
> When bob uploads an attachment
>  Then an upload response is sent to him
>  And using the blobId specified in the upload response, bob can download that attachment
> {code}
> Write integration tests for it.



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

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