Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions apps/sim/app/api/files/multipart/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,9 @@ export const POST = withRouteHandler(async (request: NextRequest) => {

const config = getStorageConfig(storageContext)

if (
!QUOTA_EXEMPT_STORAGE_CONTEXTS.has(context as StorageContext) &&
typeof fileSize === 'number'
) {
if (!QUOTA_EXEMPT_STORAGE_CONTEXTS.has(context as StorageContext)) {
const { checkStorageQuota } = await import('@/lib/billing/storage')
const quotaCheck = await checkStorageQuota(userId, fileSize)
const quotaCheck = await checkStorageQuota(userId, fileSize ?? 0)
if (!quotaCheck.allowed) {
return NextResponse.json(
{ error: quotaCheck.error || 'Storage limit exceeded' },
Expand Down
Loading
Loading