mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 12:29:07 +00:00
* Backport std::forward change * Implement `FormData` * Fix io_darwin headers issue * Implement `Blob` support in FormData * Add test for file upload * Fix bug with Blob not reading Content-Type * Finish implementing FormData * Add FormData to types --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
17 lines
565 B
C++
17 lines
565 B
C++
#include "blob.h"
|
|
|
|
extern "C" JSC::EncodedJSValue Blob__create(JSC::JSGlobalObject* globalObject, void* impl);
|
|
|
|
namespace WebCore {
|
|
|
|
JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, WebCore::Blob& impl)
|
|
{
|
|
return JSC::JSValue::decode(Blob__create(lexicalGlobalObject, Blob__dupe(impl.impl())));
|
|
}
|
|
|
|
JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, Ref<WebCore::Blob>&& impl)
|
|
{
|
|
return JSC::JSValue::decode(Blob__create(lexicalGlobalObject, impl->impl()));
|
|
}
|
|
|
|
} |