Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

[WEB 3053]feat: support LibreOffice file attachments in issues (#6343)

Sangeethade009d6d10c3
diff --git a/apiserver/plane/app/views/issue/attachment.py b/apiserver/plane/app/views/issue/attachment.py
index 4427227f12..d519a52695 100644
--- a/apiserver/plane/app/views/issue/attachment.py
+++ b/apiserver/plane/app/views/issue/attachment.py
@@ -120,10 +120,12 @@ class IssueAttachmentV2Endpoint(BaseAPIView):
# Get the presigned URL
storage = S3Storage(request=request)
+
# 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
)
+
# Return the presigned URL
return Response(
{
diff --git a/apiserver/plane/settings/common.py b/apiserver/plane/settings/common.py
index db9a244537..4de98b5501 100644
--- a/apiserver/plane/settings/common.py
+++ b/apiserver/plane/settings/common.py
@@ -361,6 +361,18 @@ ATTACHMENT_MIME_TYPES = [
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
"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",