Skip to content

Commit

Permalink
Overide the default filename of uploaded file Object
Browse files Browse the repository at this point in the history
  • Loading branch information
suubi-joshua committed Oct 20, 2024
1 parent 1cc8a7c commit 52c7f2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/framework/esm-api/src/attachments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function createAttachment(patientUuid: string, fileToUpload: Upload
formData.append('patient', patientUuid);

if (fileToUpload.file) {
formData.append('file', fileToUpload.file);
formData.append('file', fileToUpload.file, fileToUpload.fileName);
} else {
formData.append('file', new File([''], fileToUpload.fileName), fileToUpload.fileName);
formData.append('base64Content', fileToUpload.base64Content);
Expand Down

0 comments on commit 52c7f2e

Please sign in to comment.