diff --git a/lib/multer-savefilesorg-storage.js b/lib/multer-savefilesorg-storage.js index 3cdd091..056740e 100644 --- a/lib/multer-savefilesorg-storage.js +++ b/lib/multer-savefilesorg-storage.js @@ -42,9 +42,16 @@ class MulterSaveFilesOrgStorage { }, timeout: UPLOAD_TIMEOUT } - ).then(resp => { - req.file.filename = resp.data.fileEntry.url; - cb(null) + ).then(({ data }) => { + cb(null, { + name: data.fileEntry.name, + file_name: data.fileEntry.file_name, + mime: data.fileEntry.mime, + type: data.fileEntry.type, + file_size: data.fileEntry.file_size, + extension: data.fileEntry.extension, + url: data.fileEntry.url + }) }).catch(err => { cb(err) }) diff --git a/package.json b/package.json index 2d1ad05..e03f15c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "multer-savefilesorg-storage", - "version": "1.0.1", + "version": "1.0.2", "description": "Forward multipart/form-data file upload into a savefiles.org drive.", "main": "index.js", "scripts": {