Page 1 of 1

How to upload a file with CefURLRequest?

PostPosted: Tue Feb 23, 2021 12:34 pm
by SolidMercury
How to upload file with multipart form data using browser independent requests? Tried using the CefURLRequest::Create(request, client.get(), nullptr); as mentioned in https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage#markdown-header-browser-independent-requests but it fails to send multipart form data. As per the code at https://bitbucket.org/chromiumembedded/cef/src/d06fdcff8550e4b86dc23bf33ff195e8a5cd68aa/libcef/browser/net_service/browser_urlrequest_impl.cc?at=master#browser_urlrequest_impl.cc-333, it doesn't seem to support multipart form data? What other choices are there to make the request with custom resource handler. The reason custom resource handler is being used is to modify the URL and the headers.

PS: Had posted a query on this before but there was no response so reposting the query in a simplified manner in terms of the requirement.