How do i use connection.on('.....') #325
Answered
by
matt-forster
FreshImmuc
asked this question in
Q&A
-
How (where) do i use this: connection.on('STOR', (error, fileName) => {
// ...
}); Thanks in advance |
Beta Was this translation helpful? Give feedback.
Answered by
matt-forster
Jun 23, 2022
Replies: 1 comment 8 replies
-
This would be a side effect of storing a file. The file has already been stored, and the STOR handler would have already finished. You can see the emit here, right in the default STOR commend: https://github.com/QuorumDMS/ftp-srv/blob/main/src/commands/registration/stor.js#L53 So you would listen to this if you want to log out specifically the file that was stored, maybe send a metric to your observability platform, etc. |
Beta Was this translation helpful? Give feedback.
8 replies
Answer selected by
FreshImmuc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This would be a side effect of storing a file.
The file has already been stored, and the STOR handler would have already finished. You can see the emit here, right in the default STOR commend: https://github.com/QuorumDMS/ftp-srv/blob/main/src/commands/registration/stor.js#L53
So you would listen to this if you want to log out specifically the file that was stored, maybe send a metric to your observability platform, etc.