Skip to content

Commit 3810094

Browse files
committed
added new response props for objects.put method
1 parent 1407c2f commit 3810094

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.changeset/wise-panthers-raise.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@squarecloud/blob": minor
3+
---
4+
5+
`objects.put` now returns useful info about the uploaded object

src/validation/schemas/put.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ export const putObjectPayloadSchema = putObjectSchema.transform(
3636
);
3737

3838
export const putObjectResponseSchema = z.object({
39+
/** The id of the uploaded file. */
40+
id: z.string(),
41+
/** The name of the uploaded file. */
42+
name: z.string(),
43+
/** The prefix of the uploaded file. */
44+
prefix: z.string().optional(),
45+
/** The size of the uploaded file. */
46+
size: z.number(),
3947
/** The URL of the uploaded file. (File distributed in Square Cloud CDN) */
4048
url: z.string(),
4149
});

0 commit comments

Comments
 (0)