diff options
| -rw-r--r-- | 96.md | 3 |
1 files changed, 3 insertions, 0 deletions
| @@ -101,6 +101,7 @@ List of form fields: | |||
| 101 | - `alt`: **RECOMMENDED** strict description text for visibility-impaired users. | 101 | - `alt`: **RECOMMENDED** strict description text for visibility-impaired users. |
| 102 | - `media_type`: "avatar" or "banner". Informs the server if the file will be used as an avatar or banner. If absent, the server will interpret it as a normal upload, without special treatment. | 102 | - `media_type`: "avatar" or "banner". Informs the server if the file will be used as an avatar or banner. If absent, the server will interpret it as a normal upload, without special treatment. |
| 103 | - `content_type`: mime type such as "image/jpeg". This is just a value the server can use to reject early if the mime type isn't supported. | 103 | - `content_type`: mime type such as "image/jpeg". This is just a value the server can use to reject early if the mime type isn't supported. |
| 104 | - `no_transform`: "true" asks server not to transform the file and serve the uploaded file as is, may be rejected. | ||
| 104 | 105 | ||
| 105 | Others custom form data fields may be used depending on specific `server` support. | 106 | Others custom form data fields may be used depending on specific `server` support. |
| 106 | The `server` isn't required to store any metadata sent by `clients`. | 107 | The `server` isn't required to store any metadata sent by `clients`. |
| @@ -110,6 +111,8 @@ The hash is enough to uniquely identify a file, that's why it will be used on th | |||
| 110 | 111 | ||
| 111 | The `server` MUST link the user's `pubkey` string as the owner of the file so to later allow them to delete the file. | 112 | The `server` MUST link the user's `pubkey` string as the owner of the file so to later allow them to delete the file. |
| 112 | 113 | ||
| 114 | `no_transform` can be used to replicate a file to multiple servers for redundancy, clients can use the [server list](#selecting-a-server) to find alternative servers which might contain the same file. When uploading a file and requesting `no_transform` clients should check that the hash matches in the response in order to detect if the file was modified. | ||
| 115 | |||
| 113 | ### Response codes | 116 | ### Response codes |
| 114 | 117 | ||
| 115 | - `200 OK`: File upload exists, but is successful (Existing hash) | 118 | - `200 OK`: File upload exists, but is successful (Existing hash) |