Hi all,
I'm trying to implement an upload process indicator for an image upload via UMTS. Unfortunately this does not work, as the GetNextDataPart() of my data supplier is called only once, even though I return EFalse.
iPostData is not deleted during the transaction - I tried the same with a dummy function:Code:TBool CClientEngine::GetNextDataPart(TPtrC8& aDataPart) { TBool lastBuffer=ETrue; if(iPostData) { TInt totalSize=iPostData->Length(); TInt sentSize=iCurrentChunk*iChunkSize; TInt chunkSize=totalSize-sentSize; if (chunkSize>iChunkSize) { chunkSize=iChunkSize; lastBuffer=EFalse; } else lastBuffer=ETrue; if (iChunkData) delete iChunkData; iChunkData=HBufC8::NewL(chunkSize); ChunkData->Des().Copy(iPostData->Des().Ptr()+sentSize,chunkSize); aDataPart.Set(iChunkData->Des()); iCurrentChunk++; } return lastBuffer; }
even here, the funcion is called only once and iCurrentChunk equals 1 all the time. The only way to finish my upload is to do it in one chunk only - if i set the chunk to iPostData so that aDataPart.Length equals OverallDataSize the transaction completes, EVEN THOUGH I still return EFalse. Anyone eyperienced the same or got any hints?Code:TBool CClientEngine::GetNextDataPart(TPtrC8& aDataPart) { TInt chunkSize=10; if (iChunkData) delete iChunkData; iChunkData=HBufC8::NewL(chunkSize); aDataPart.Set(iChunkData->Des()); iCurrentChunk++; return EFalse; }
Thanks to all of you,
Chris





