From f9de6d8384e1b8e1baaf36489804e2a19193e809 Mon Sep 17 00:00:00 2001 From: canpan14 Date: Wed, 12 Jul 2023 15:29:46 -0400 Subject: [PATCH 1/3] Adds request-direct-access-url file name option --- .../webapp/definitions/alfresco-core.yaml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/main/webapp/definitions/alfresco-core.yaml b/src/main/webapp/definitions/alfresco-core.yaml index bc9667b9..4e90327a 100755 --- a/src/main/webapp/definitions/alfresco-core.yaml +++ b/src/main/webapp/definitions/alfresco-core.yaml @@ -2162,6 +2162,9 @@ paths: If the content type is not supported for preview, then a value of **false** is ignored, and the attachment will be returned in the response. + + The **fileName** field is optional for setting the file name when downloaded. By default Alfresco + will use the `cm:name` attribute unless configured otherwise. required: false schema: $ref: '#/definitions/DirectAccessUrlBodyCreate' @@ -2448,6 +2451,9 @@ paths: If the content type is not supported for preview, then a value of **false** is ignored, and the attachment will be returned in the response. + + The **fileName** field is optional for setting the file name when downloaded. By default Alfresco + will use the `cm:name` attribute unless configured otherwise. required: false schema: $ref: '#/definitions/DirectAccessUrlBodyCreate' @@ -3125,6 +3131,9 @@ paths: If the content type is not supported for preview, then a value of **false** is ignored, and the attachment will be returned in the response. + + The **fileName** field is optional for setting the file name when downloaded. By default Alfresco + will use the `cm:name` attribute unless configured otherwise. required: false schema: $ref: '#/definitions/DirectAccessUrlBodyCreate' @@ -3459,6 +3468,9 @@ paths: Note: It is up to the actual ContentStore implementation if it can fulfil this request or not. + + The **fileName** field is optional for setting the file name when downloaded. By default Alfresco + will use the `cm:name` attribute unless configured otherwise. required: false schema: $ref: '#/definitions/DirectAccessUrlBodyCreate' @@ -4152,6 +4164,9 @@ paths: If the content type is not supported for preview, then a value of **false** is ignored, and the attachment will be returned in the response. + + The **fileName** field is optional for setting the file name when downloaded. By default Alfresco + will use the `cm:name` attribute unless configured otherwise. required: false schema: $ref: '#/definitions/DirectAccessUrlBodyCreate' @@ -4401,6 +4416,9 @@ paths: If the content type is not supported for preview, then a value of **false** is ignored, and the attachment will be returned in the response. + + The **fileName** field is optional for setting the file name when downloaded. By default Alfresco + will use the `cm:name` attribute unless configured otherwise. required: false schema: $ref: '#/definitions/DirectAccessUrlBodyCreate' @@ -10683,6 +10701,9 @@ definitions: attachment: type: boolean description: URL type (embedded/attachment). + fileName: + type: string + description: Optional file name when downloaded DirectAccessUrlEntry: type: object required: From 755de290e5ed0695248852d3d12fc95e30f029d6 Mon Sep 17 00:00:00 2001 From: canpan14 Date: Thu, 20 Jul 2023 12:10:45 -0400 Subject: [PATCH 2/3] Add file name in response and fix expiryTime typo --- src/main/webapp/definitions/alfresco-core.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/definitions/alfresco-core.yaml b/src/main/webapp/definitions/alfresco-core.yaml index 4e90327a..e77ee0a5 100755 --- a/src/main/webapp/definitions/alfresco-core.yaml +++ b/src/main/webapp/definitions/alfresco-core.yaml @@ -10722,10 +10722,13 @@ definitions: attachment: type: boolean description: Flag to control the download method, **true** for attachment URL, **false** for embedded URL - expiresAt: + expiryTime: type: string format: date-time description: The direct access URL would become invalid when the expiry date is reached + fileName: + type: string + description: The file name when downloaded SharedLinkBodyCreate: type: object required: From 62f240d11a4c3f23bca9868e5ed7b2e57f5a14c0 Mon Sep 17 00:00:00 2001 From: canpan14 Date: Fri, 21 Jul 2023 21:34:31 -0400 Subject: [PATCH 3/3] Undo expiresAt fix --- src/main/webapp/definitions/alfresco-core.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/definitions/alfresco-core.yaml b/src/main/webapp/definitions/alfresco-core.yaml index e77ee0a5..7120660f 100755 --- a/src/main/webapp/definitions/alfresco-core.yaml +++ b/src/main/webapp/definitions/alfresco-core.yaml @@ -10722,7 +10722,7 @@ definitions: attachment: type: boolean description: Flag to control the download method, **true** for attachment URL, **false** for embedded URL - expiryTime: + expiresAt: type: string format: date-time description: The direct access URL would become invalid when the expiry date is reached