mirror of
https://github.com/diced/zipline.git
synced 2025-12-05 20:40:12 -08:00
feat: add file name in upload response
This commit is contained in:
@@ -41,6 +41,7 @@ export const getExtension = (filename: string, override?: string): string => {
|
|||||||
export type ApiUploadResponse = {
|
export type ApiUploadResponse = {
|
||||||
files: {
|
files: {
|
||||||
id: string;
|
id: string;
|
||||||
|
name: string;
|
||||||
type: string;
|
type: string;
|
||||||
url: string;
|
url: string;
|
||||||
pending?: boolean;
|
pending?: boolean;
|
||||||
@@ -212,6 +213,7 @@ export default fastifyPlugin(
|
|||||||
|
|
||||||
response.files.push({
|
response.files.push({
|
||||||
id: fileUpload.id,
|
id: fileUpload.id,
|
||||||
|
name: fileUpload.name,
|
||||||
type: fileUpload.type,
|
type: fileUpload.type,
|
||||||
url: encodeURI(responseUrl),
|
url: encodeURI(responseUrl),
|
||||||
removedGps: removedGps || undefined,
|
removedGps: removedGps || undefined,
|
||||||
|
|||||||
@@ -256,6 +256,7 @@ export default fastifyPlugin(
|
|||||||
|
|
||||||
response.files.push({
|
response.files.push({
|
||||||
id: fileUpload.id,
|
id: fileUpload.id,
|
||||||
|
name: fileUpload.name,
|
||||||
type: fileUpload.type,
|
type: fileUpload.type,
|
||||||
url: responseUrl,
|
url: responseUrl,
|
||||||
pending: true,
|
pending: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user