Skip to content

Commit

Permalink
changed move command to copy
Browse files Browse the repository at this point in the history
  • Loading branch information
airarrazaval committed Jun 7, 2020
1 parent 32a9597 commit b1e7038
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions providers/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class LocalProvider extends Provider {
static upload(file, dir) {
const localDir = `${uploadDir}/${dir}`;
return fs.ensureDir(localDir).then(() => {
return fs.move(file.path, `${localDir}/${file.filename}`).then(() => {
return fs.copy(file.path, `${localDir}/${file.filename}`).then(() => {
file.url = '/' + encodeURIComponent(`${dir}/${file.filename}`);
return file;
});
Expand All @@ -27,4 +27,4 @@ class LocalProvider extends Provider {
}
}

module.exports = LocalProvider;
module.exports = LocalProvider;

0 comments on commit b1e7038

Please sign in to comment.