symphonicc / multer-azure-blob-storage

ES6 & Typescript friendly multer storage engine for Azure's blob storage.
MIT License
19 stars 25 forks source link

MulterAzureStorage._removeFile fails with ArgumentNullError #12

Closed lpfeup closed 5 years ago

lpfeup commented 5 years ago

calls to MulterAzureStorage._removeFile fail with the following error:

ArgumentNullError: Required argument blob for function deleteBlobIfExists is not defined

This line is the culprit: https://github.com/symphonicc/multer-azure-blob-storage/blob/9d6e3d7e0e8bba16e4dd922862964cdef6b05f37/src/MulterAzureStorage.ts#L254

MulterAzureStorage._deleteBlobIfExists should use file.blobName instead of file.filename, since filename is a property specific to multer disk storage (https://github.com/expressjs/multer/blob/master/storage/disk.js)

Sliverb commented 5 years ago

Fixed thanks to @lpfeup