Skip to content
Merged
7 changes: 7 additions & 0 deletions apps/sim/app/api/tools/supabase/storage-upload/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ export const POST = withRouteHandler(async (request: NextRequest) => {
'Content-Type': uploadContentType,
}

if (validatedData.cacheControl) {
const cacheControl = validatedData.cacheControl.trim()
headers['cache-control'] = /^\d+$/.test(cacheControl)
? `max-age=${cacheControl}`
: cacheControl
}
Comment thread
waleedlatif1 marked this conversation as resolved.

if (validatedData.upsert) {
headers['x-upsert'] = 'true'
}
Expand Down
Loading
Loading