Skip to content

Commit

Permalink
Fix update of conflicting files
Browse files Browse the repository at this point in the history
  • Loading branch information
MrFlashAccount committed Sep 17, 2024
1 parent a753352 commit f379aa9
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions app/dashboard/src/layouts/AssetsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1853,13 +1853,14 @@ export default function AssetsTable(props: AssetsTableProps) {

const asset = isUpdating ? conflict.current : conflict.new

fileMap.set(
asset.id,
new File([conflict.file], asset.title, {
type: conflict.file.type,
lastModified: conflict.file.lastModified,
}),
)
const renamedFile = new File([conflict.file], asset.title, {
type: conflict.file.type,
lastModified: conflict.file.lastModified,
})

renamedFile.path = conflict.file.path

fileMap.set(asset.id, renamedFile)

insertAssets([asset], event.parentId)
void doUploadFile(asset, isUpdating ? 'update' : 'new')
Expand Down

0 comments on commit f379aa9

Please sign in to comment.