Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/features/upload-file/providers/local-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export class LocalProvider extends BaseProvider {
const filePath = process.platform === 'win32' ? this.path(key) : this.path(key).slice(1) // adjusting file path according to OS

await fs.promises.mkdir(path.dirname(filePath), { recursive: true })
await fs.promises.rename(file.path, filePath)
await fs.promises.copyFile(file.path, filePath) //Changed for Error: EXDEV: cross-device link not permitted
await fs.promises.unlink(file.path)
}

public async delete(key: string, bucket: string): Promise<any> {
Expand Down