Issue with multipart file upload with CefURLRequest::Create

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Issue with multipart file upload with CefURLRequest::Create

Postby SolidMercury » Mon Feb 01, 2021 1:22 am

When custom resource handler is used multipart file upload is not working. Quick debugging showed that UploadFileElementReader is not getting called and there is no file content being sent. But with default handler its is working fine. The custom resource handler is calling CefURLRequest::Create(request, client.get(), nullptr); in the ProcessRequest().

Just before the CefURLRequest::Create, checked the request objects's Postdata element vector. It does have 3 elements.
1. Byte type
Content-Disposition: form-data; name="textline"

Content-Disposition: form-data; name="datafile"; filename="test.reg"
Content-Type: application/octet-stream

2. File type: Contains path to selected file.

3. Byte type

But when the request is made, the above contents are not part of the request which has been verified from the fiddler as well as the debugger.
After debugging further it was found that the multi-part support is not implemented as per the code at ...

Am I missing something here or is it really not supported? If it is not, are there any workaround to get this working? Does concatenating multiple elements into one byte type element make this to work?
Posts: 3
Joined: Sun Dec 13, 2020 11:47 pm

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 15 guests