Skip to content

Commit

Permalink
try fixing model upload bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ghackenberg committed Jan 7, 2025
1 parent 365578f commit ba69d29
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/frontend/src/scripts/clients/rest/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ class VersionClientImpl implements VersionREST<VersionCreate, VersionUpdate, Blo
const body = new FormData()
body.append('data', JSON.stringify(data))
if (files.model) {
body.append('model', files.model, files.model.type == 'application/x-ldraw' && 'model.ldr')
if (files.model.type == 'application/x-ldraw') {
body.append('model', files.model, 'model.ldr')
} else {
body.append('model', files.model)
}
}
if (files.image) {
body.append('image', files.image)
Expand Down

0 comments on commit ba69d29

Please sign in to comment.