Add new allowed trust center file types
Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
@@ -1742,11 +1742,7 @@ func (s *DocumentService) Export(
|
||||
return fmt.Errorf("cannot load document version for %q: %w", documentID, err)
|
||||
}
|
||||
|
||||
pdfOptions := ExportPDFOptions{
|
||||
WithWatermark: options.WithWatermark,
|
||||
WatermarkEmail: options.WatermarkEmail,
|
||||
WithSignatures: options.WithSignatures,
|
||||
}
|
||||
pdfOptions := ExportPDFOptions(options)
|
||||
|
||||
exportedPDF, err := exportDocumentPDF(
|
||||
ctx,
|
||||
|
||||
@@ -222,10 +222,37 @@ func (s *Service) WithTenant(tenantID gid.TenantID) *TenantService {
|
||||
fileValidator: &filevalidation.FileValidator{
|
||||
MaxFileSize: 10 * 1024 * 1024, // 10MB
|
||||
AllowedMimeTypes: map[string]bool{
|
||||
"application/pdf": true,
|
||||
"application/json": true,
|
||||
"application/msword": true,
|
||||
"application/pdf": true,
|
||||
"application/vnd.ms-excel": true,
|
||||
"application/vnd.ms-powerpoint": true,
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation": true,
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": true,
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": true,
|
||||
"image/jpeg": true,
|
||||
"image/png": true,
|
||||
"image/svg+xml": true,
|
||||
"image/webp": true,
|
||||
"text/csv": true,
|
||||
"text/markdown": true,
|
||||
},
|
||||
AllowedExtensions: map[string][]string{
|
||||
".pdf": {"application/pdf"},
|
||||
".csv": {"text/csv"},
|
||||
".doc": {"application/msword"},
|
||||
".docx": {"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},
|
||||
".jpeg": {"image/jpeg"},
|
||||
".jpg": {"image/jpeg"},
|
||||
".json": {"application/json"},
|
||||
".md": {"text/markdown"},
|
||||
".pdf": {"application/pdf"},
|
||||
".png": {"image/png"},
|
||||
".ppt": {"application/vnd.ms-powerpoint"},
|
||||
".pptx": {"application/vnd.openxmlformats-officedocument.presentationml.presentation"},
|
||||
".svg": {"image/svg+xml"},
|
||||
".webp": {"image/webp"},
|
||||
".xls": {"application/vnd.ms-excel"},
|
||||
".xlsx": {"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user