backend event uploadFinished: fullPath corresponds to the path that was actually written

Massimo Melina committed Jun 18, 2026 at 16:48 UTC 226845c9a52408e4b36f6bd776416f99fccf4c4d
2 files changed +4 -3
dev-plugins.md
+3 -2
@@ -790,11 +790,11 @@ This section is still partially documented, and you may need to have a look at t
790 - `httpsServerOptions` if you need to customize the options of the https server.
791 - return: object with some properties [documented here](https://nodejs.org/api/https.html#httpscreateserveroptions-requestlistener).
792 - `uploadStart`
793 - - parameters: { ctx, writeStream, fullPath, tempName, resume, fullSize }
793 + - parameters: { ctx, fullPath, tempName, resume, fullSize, writeStream }
794 - preventable
795 - return: callback to call when upload is finished
796 - `uploadFinished`
797 - - parameters: { ctx, uri, writeStream }
797 + - parameters: { ctx, uri, fullPath, writeStream }
798 - `publicIpsChanged`
799 - parameters: { IPs, IP4, IP6, IPX }
800 - `newSocket`
@@ -1206,3 +1206,4 @@ If you want to override a text regardless of the language, use the special langu
1206 - 13.1 (v3.2.0)
1207 - backend events: logRotated
1208 - listDiskFolder gets "hidden" parameter
1209 + - backend event uploadFinished: fullPath corresponds to the path that was actually written
\ No newline at end of file
src/upload.ts
+1 -1
@@ -201,7 +201,7 @@ export function uploadWriter(base: VfsNode, baseUri: string, filename: string, c
201 if (mtime) // so we use it to touch the file
202 await utimes(dest, Date.now() / 1000, mtime / 1000)
203 cancelDeletion(tempName) // not necessary, as deletion's failure is silent, but still
204 - ctx.state.uploadDestinationPath = dest
204 + obj.fullPath = ctx.state.uploadDestinationPath = dest
205 void setUploadMeta(dest, ctx)
206 if (ctx.query.comment)
207 void setCommentFor(dest, String(ctx.query.comment))