From c6531a4e9d33cd9057c73cd4aebe54ace087b07d Mon Sep 17 00:00:00 2001 From: sangeethailango Date: Tue, 7 Jan 2025 18:30:05 +0530 Subject: [PATCH 1/3] feat: API endpoints for stickies --- apiserver/plane/app/views/issue/attachment.py | 5 +++++ apiserver/plane/settings/common.py | 1 + 2 files changed, 6 insertions(+) diff --git a/apiserver/plane/app/views/issue/attachment.py b/apiserver/plane/app/views/issue/attachment.py index 4427227f12a..1cea686089b 100644 --- a/apiserver/plane/app/views/issue/attachment.py +++ b/apiserver/plane/app/views/issue/attachment.py @@ -118,12 +118,17 @@ def post(self, request, slug, project_id, issue_id): entity_type=FileAsset.EntityTypeContext.ISSUE_ATTACHMENT, ) + print(asset, "Print Assert") + # Get the presigned URL storage = S3Storage(request=request) + print(storage, "Print Storage") + # Generate a presigned URL to share an S3 object presigned_url = storage.generate_presigned_post( object_name=asset_key, file_type=type, file_size=size_limit ) + print(presigned_url, "Print Presigned_URL") # Return the presigned URL return Response( { diff --git a/apiserver/plane/settings/common.py b/apiserver/plane/settings/common.py index db9a244537f..a3126d887c0 100644 --- a/apiserver/plane/settings/common.py +++ b/apiserver/plane/settings/common.py @@ -361,6 +361,7 @@ "application/vnd.openxmlformats-officedocument.presentationml.presentation", "text/plain", "application/rtf", + "application/vnd.oasis.opendocument.spreadsheet", # Audio "audio/mpeg", "audio/wav", From 07773ea983ef3116627cb7a9e077a913498410b3 Mon Sep 17 00:00:00 2001 From: sangeethailango Date: Wed, 8 Jan 2025 15:23:07 +0530 Subject: [PATCH 2/3] Support libre office in issue attachments --- apiserver/plane/app/views/issue/attachment.py | 5 +---- apiserver/plane/settings/common.py | 13 +++++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/apiserver/plane/app/views/issue/attachment.py b/apiserver/plane/app/views/issue/attachment.py index 1cea686089b..d519a52695d 100644 --- a/apiserver/plane/app/views/issue/attachment.py +++ b/apiserver/plane/app/views/issue/attachment.py @@ -118,17 +118,14 @@ def post(self, request, slug, project_id, issue_id): entity_type=FileAsset.EntityTypeContext.ISSUE_ATTACHMENT, ) - print(asset, "Print Assert") - # Get the presigned URL storage = S3Storage(request=request) - print(storage, "Print Storage") # Generate a presigned URL to share an S3 object presigned_url = storage.generate_presigned_post( object_name=asset_key, file_type=type, file_size=size_limit ) - print(presigned_url, "Print Presigned_URL") + # Return the presigned URL return Response( { diff --git a/apiserver/plane/settings/common.py b/apiserver/plane/settings/common.py index a3126d887c0..f183e125432 100644 --- a/apiserver/plane/settings/common.py +++ b/apiserver/plane/settings/common.py @@ -362,6 +362,17 @@ "text/plain", "application/rtf", "application/vnd.oasis.opendocument.spreadsheet", + "application/vnd.oasis.opendocument.text", + "application/vnd.oasis.opendocument.presentation", + "application/vnd.oasis.opendocument.graphics", + # Microsoft Visio + "application/vnd.visio", + # Netpbm format + "image/x-portable-graymap", + "image/x-portable-bitmap", + "image/x-portable-pixmap", + # Open Office Bae + "application/vnd.oasis.opendocument.database", # Audio "audio/mpeg", "audio/wav", @@ -379,6 +390,8 @@ "video/quicktime", "video/x-msvideo", "video/x-ms-wmv", + # Flash video + "video/x-flv", # Archives "application/zip", "application/x-rar-compressed", From 01f68049f6e382e61c753bc958046b924c874e06 Mon Sep 17 00:00:00 2001 From: sangeethailango Date: Thu, 9 Jan 2025 15:02:13 +0530 Subject: [PATCH 3/3] Remove flash --- apiserver/plane/settings/common.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/apiserver/plane/settings/common.py b/apiserver/plane/settings/common.py index f183e125432..4de98b5501c 100644 --- a/apiserver/plane/settings/common.py +++ b/apiserver/plane/settings/common.py @@ -390,8 +390,6 @@ "video/quicktime", "video/x-msvideo", "video/x-ms-wmv", - # Flash video - "video/x-flv", # Archives "application/zip", "application/x-rar-compressed",