Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix: missing fields

Marc Seitz159220fe7c6f
diff --git a/components/links/link-sheet/agreement-panel/index.tsx b/components/links/link-sheet/agreement-panel/index.tsx
index 7c20cbed..85674797 100644
--- a/components/links/link-sheet/agreement-panel/index.tsx
+++ b/components/links/link-sheet/agreement-panel/index.tsx
@@ -59,9 +59,10 @@ export default function AgreementSheet({
try {
setIsLoading(true);
- const contentType = getSupportedContentType(currentFile.type);
+ const contentType = currentFile.type;
+ const supportedFileType = getSupportedContentType(contentType);
- if (!contentType || currentFile.type !== "application/pdf") {
+ if (!supportedFileType || contentType !== "application/pdf") {
toast.error("Unsupported file format. Please upload a PDF file.");
return;
}
@@ -76,6 +77,7 @@ export default function AgreementSheet({
key: data!,
storageType: type!,
contentType: contentType,
+ supportedFileType: supportedFileType,
};
// create a document in the database
const response = await createAgreementDocument({
diff --git a/components/welcome/dataroom-upload.tsx b/components/welcome/dataroom-upload.tsx
index 171201ce..f23d8a0e 100644
--- a/components/welcome/dataroom-upload.tsx
+++ b/components/welcome/dataroom-upload.tsx
@@ -63,9 +63,10 @@ export default function DataroomUpload({ dataroomId }: DataroomUploadProps) {
try {
setUploading(true);
- const contentType = getSupportedContentType(currentFile.type);
+ const contentType = currentFile.type;
+ const supportedFileType = getSupportedContentType(contentType);
- if (!contentType) {
+ if (!supportedFileType) {
setUploading(false);
toast.error(
"Unsupported file format. Please upload a PDF or Excel file.",
@@ -86,6 +87,7 @@ export default function DataroomUpload({ dataroomId }: DataroomUploadProps) {
key: data!,
storageType: type!,
contentType: contentType,
+ supportedFileType: supportedFileType,
};
const response = await createDocument({ documentData, teamId, numPages });
diff --git a/components/welcome/special-upload.tsx b/components/welcome/special-upload.tsx
index 990df02c..302e36a5 100644
--- a/components/welcome/special-upload.tsx
+++ b/components/welcome/special-upload.tsx
@@ -81,9 +81,10 @@ export default function DeckGeneratorUpload() {
try {
setUploading(true);
- const contentType = getSupportedContentType(currentFile.type);
+ const contentType = currentFile.type;
+ const supportedFileType = getSupportedContentType(contentType);
- if (!contentType) {
+ if (!supportedFileType) {
setUploading(false);
toast.error(
"Unsupported file format. Please upload a PDF or Excel file.",
@@ -104,6 +105,7 @@ export default function DeckGeneratorUpload() {
key: data!,
storageType: type!,
contentType: contentType,
+ supportedFileType: supportedFileType,
};
// create a document in the database
const response = await createDocument({ documentData, teamId, numPages });