What to do when CefPostDataElement.ElementType is File?
Posted: Sun Aug 06, 2017 4:48 pm
Hello,
I'm trying to get some information about a CefRequest, and I've come across this case:
Looking at the post data element type, what does it mean if the type is file? What does the return type of "GetFile()" indicate? The path to the file?
I'm trying to get some information about a CefRequest, and I've come across this case:
- Code: Select all
var postData = request.PostData;
if (postData != null && postData.Count > 0)
{
foreach (CefPostDataElement postDataElement in postData.GetElements()) {
switch (postDataElement.ElementType)
{
case CefPostDataElementType.Bytes:
var bytes = postDataElement.GetBytes();
this.WebRequest.GetRequestStream().Write(bytes, 0, bytes.Length);
break;
case CefPostDataElementType.File:
// not sure what to do in this case???
var file = postDataElement.GetFile();
break;
}
}
}
Looking at the post data element type, what does it mean if the type is file? What does the return type of "GetFile()" indicate? The path to the file?