Hi,

I try to upload a video file from a Nokia 5800.
I am writing my code based on http://wiki.forum.nokia.com/index.ph...part/form-data.
My problem is that I have a big video file (e.g. 45MB) and when I try to create a buffer for the file a panic exception occurs.
I guess it is not possible to create such a big buffer in memory.

TFileName fileName;
RFile iReqBodyFile;

fileName.Copy(mFilePath);
if (iFileServ.IsValidName(fileName)) {
TInt iRetVal = iReqBodyFile.Open(iFileServ, mFilePath , EFileRead);
if (KErrNone != iRetVal){
return EFalse;
}

TInt ourFilesize = 0;
User::LeaveIfError(iReqBodyFile.Size(ourFilesize));

iReqBodySubmitBuffer = HBufC8::NewL(ourFilesize); // panic exception happens here
TPtr8 aPtr= iReqBodySubmitBuffer->Des();
TInt readerr = iReqBodyFile.Read(0,aPtr,ourFilesize);
if (readerr != KErrNone){
return EFalse;
}

iReqBodySubmitBuffer1 = NULL;
iReqBodySubmitBuffer1 = HBufC8::NewL(xmlPtr.Length()+ending.Size()+aPtr.Length());

TPtr8 iPostDataPtr = iReqBodySubmitBuffer1->Des();
iPostDataPtr.Zero();
iPostDataPtr.Append(xmlPtr); // some xml data
iPostDataPtr.Append(aPtr);
iPostDataPtr.Append(ending);
}

I debugged the code with Carbide.C++ v2.0 direct on the Nokia device.
The debug exception output is:
Signal 'Exception 100' received. Description: Thread 0x1ec has panicked. Category: E32USER-CBase; Reason: 47.


Can somebody help me how to send a Multipart/form-data HTTP Post request with a large file?
What needs to be done different?

Thank you very much for your help

Mirko