Repository navigation
Conversation
Filter undefined file options before applying upload defaults so documented values are preserved. fix supabase#2788
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Priority: ➖ Normal Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to
|
Summary
When optional
FileOptionsare explicitlyundefined, spreading them over the defaults replaces those defaults. Raw uploads can send headers such ascache-control: max-age=undefinedandcontent-type: undefined; multipart uploads can send thecacheControlfield as"undefined".Ignore undefined-valued options before applying defaults in regular and signed uploads. Explicitly allow
undefinedforcacheControl,contentType, andupsertso callers usingexactOptionalPropertyTypescan express this behavior. Add regression coverage for raw headers and multipart cache control acrossupload,update, anduploadToSignedUrl.Closes #2788.
Validation
git diff --checkpassed.