1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 02:27:43 +00:00

LibWeb: Do not blindly create File objects when adding FormData entries

We were unconditionally creating new File objects for all Blob-type
values passed to `FormData.append`. We should only do so if the value is
not already a File object (or if the `filename` attribute is present).

We must also carry MIME type information forward from the underlying
Blob object.
This commit is contained in:
Timothy Flynn 2024-03-13 16:42:09 -04:00 committed by Andreas Kling
parent f55471333b
commit bb38cc1010
3 changed files with 35 additions and 9 deletions

View file

@ -0,0 +1,2 @@
Name: test.txt
Type: text/plain