feat: add file name in upload response

This commit is contained in:
diced
2025-10-03 21:01:18 -07:00
parent c9d492f9d2
commit 2f19140085
2 changed files with 3 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ export const getExtension = (filename: string, override?: string): string => {
export type ApiUploadResponse = {
files: {
id: string;
name: string;
type: string;
url: string;
pending?: boolean;
@@ -212,6 +213,7 @@ export default fastifyPlugin(
response.files.push({
id: fileUpload.id,
name: fileUpload.name,
type: fileUpload.type,
url: encodeURI(responseUrl),
removedGps: removedGps || undefined,

View File

@@ -256,6 +256,7 @@ export default fastifyPlugin(
response.files.push({
id: fileUpload.id,
name: fileUpload.name,
type: fileUpload.type,
url: responseUrl,
pending: true,