Skip to content

Commit d0b9ce9

Browse files
authored
Fix: Use uploadObject.getMimeType() instead of hardcoded mimetype (#50)
1 parent f420efb commit d0b9ce9

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Client/src/common/AMCApplication.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ export default class AMCApplication extends Common.AMCObject {
561561
formData.append("size", chunkData.byteLength);
562562
formData.append("offset", uploadOffset);
563563
formData.append("data", new Blob([chunkData], {
564-
type: "application/3mf"
564+
type: uploadObject.getMimeType ()
565565
}), uploadObject.getFileName ());
566566

567567
application.axiosPostFormData("/upload/" + uploadObject.streamuuid, formData)
@@ -689,7 +689,7 @@ export default class AMCApplication extends Common.AMCObject {
689689
formData.append("size", chunkData.byteLength);
690690
formData.append("offset", uploadOffset);
691691
formData.append("data", new Blob([chunkData], {
692-
type: "application/3mf"
692+
type: uploadObject.getMimeType ()
693693
}), uploadObject.getFileName ());
694694

695695
application.axiosPostFormData("/upload/" + uploadObject.streamuuid, formData)

Client/src/common/AMCImplementation_Upload.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,12 @@ export default class AMCUpload extends Common.AMCObject {
191191
{
192192
return this.sha256sum;
193193
}
194-
194+
195+
getMimeType ()
196+
{
197+
return this.itemState.getMimeType();
198+
}
199+
195200
checkIfUploadIsActive ()
196201
{
197202
if (this.itemState) {

0 commit comments

Comments
 (0)