Add routes to retrive the archive of an attachment

This commit is contained in:
Eike Kettner
2020-03-22 21:21:49 +01:00
parent 9a99c852a8
commit cbc95b11e6
3 changed files with 104 additions and 9 deletions

View File

@ -1265,6 +1265,58 @@ paths:
schema:
type: string
format: binary
/sec/attachment/{id}/archive:
head:
tags: [ Attachment ]
summary: Get an attachment archive file.
description: |
Get information about the archive that contains the attachment
with the given id.
If the attachment was not uploaded as part of an archive, 404
is returned.
security:
- authTokenHeader: []
parameters:
- $ref: "#/components/parameters/id"
responses:
200:
description: Ok
headers:
Content-Type:
schema:
type: string
Content-Length:
schema:
type: integer
format: int64
ETag:
schema:
type: string
Content-Disposition:
schema:
type: string
get:
tags: [ Attachment ]
summary: Get an attachment archive file.
description: |
Get the archive file that was originally uploaded that
contains the attachment with the given id.
If the attachment was not uploaded as part of an archive, a
404 is returned.
security:
- authTokenHeader: []
parameters:
- $ref: "#/components/parameters/id"
responses:
200:
description: Ok
content:
application/octet-stream:
schema:
type: string
format: binary
/sec/attachment/{id}/meta:
get:
tags: [ Attachment ]