@samitouri / QOSami-HFS / commits / 455ddb78

plugins: uploadStart now gets fullPath, tempName, resume, fullSize

Massimo Melina committed Sep 14, 2025 at 15:32 UTC 455ddb783304e1cf855365cc80dbb4c82a3bc61c
3 files changed +6 -4
dev-plugins.md
+4 -2
@@ -713,7 +713,7 @@ This section is still partially documented, and you may need to have a look at t
713 - `httpsServerOptions` if you need to customize the options of the https server.
714 - return: object with some properties [documented here](https://nodejs.org/api/https.html#httpscreateserveroptions-requestlistener).
715 - `uploadStart`
716 - - parameters: { ctx, writeStream }
716 + - parameters: { ctx, writeStream, fullPath, tempName, resume, fullSize }
717 - preventable
718 - return: callback to call when upload is finished
719 - `uploadFinished`
@@ -1062,4 +1062,6 @@ If you want to override a text regardless of the language, use the special langu
1062 - 12.91 (v0.57.15)
1063 - HFS.isVideoComponent, HFS.markVideoComponent, HFS.isAudioComponent, HFS.markAudioComponent
1064 - 12.92 (v0.57.16)
1065 - - fixed checkVfsPermission
\ No newline at end of file
1065 + - fixed checkVfsPermission
1066 +- 12.93 (v0.57.17)
1067 + - uploadStart now gets fullPath, tempName, resume, fullSize
\ No newline at end of file
src/const.ts
+1 -1
@@ -9,7 +9,7 @@ import { formatTimestamp } from './cross'
9 import { argv } from './argv'
10 export * from './cross-const'
11
12 -export const API_VERSION = 12.92
12 +export const API_VERSION = 12.93
13 export const COMPATIBLE_API_VERSION = 1 // while changes in the api are not breaking, this number stays the same, otherwise it is made equal to API_VERSION
14
15 // you can add arguments with this file, currently used for the update process on mac/linux
src/upload.ts
+1 -1
@@ -143,7 +143,7 @@ export function uploadWriter(base: VfsNode, baseUri: string, path: string, ctx:
143 const fullSize = stillToWrite + resume
144 ctx.state.uploadDestinationPath = tempName
145 // allow plugins to mess with the write-stream, because the read-stream can be complicated in case of multipart
146 - const obj = { ctx, writeStream, uri: '' }
146 + const obj = { ctx, writeStream, fullPath, tempName, resume, fullSize, uri: '' }
147 const resEvent = events.emit('uploadStart', obj)
148 if (resEvent?.isDefaultPrevented()) return
149