Skip to content

Commit

Permalink
Fix filename property name for object given to the onCompleted op…
Browse files Browse the repository at this point in the history
…tion (#157)

Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
jrainlau and sindresorhus committed Oct 24, 2022
1 parent 0d07cb4 commit 4fec5ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ function registerListener(session, options, callback = () => {}) {

if (typeof options.onCompleted === 'function') {
options.onCompleted({
fileName: item.getFilename(),
fileName: item.getFilename(), // Just for backwards compatibility. TODO: Remove in the next major version.
filename: item.getFilename(),
path: savePath,
fileSize: item.getReceivedBytes(),
mimeType: item.getMimeType(),
Expand Down

0 comments on commit 4fec5ba

Please sign in to comment.