Hi,
I send files from a web client to a web server via xml-rpc.
On the client I encode it and on the server I decode it.
When I decode it the size is not the same as the client and I can't open it.
I did a test procedure and I verified that I also encounter the same problem locally.
If you try the procedure by opening a file of at least 2 megabytes the test fails.
How can I solve it?
Thank you
Code:
Object oCharTranslate is a cCharTranslate
End_Object


Procedure TestBase64EncodeUCharArray
    Set_Argument_Size 256000
    UChar[] ucIn ucOut ucOut2
    String sFile 
    Integer iSize1 iSize2 iSize3
    Integer iChn


    Get Seq_New_Channel to iChn
    Direct_Input channel iChn ("binary:d:\A\VEN-IN.TXT") // 2 megabyte
    Read_Block channel iChn  ucIn -1
    Close_Output channel iChn
    Send Seq_Release_Channel iChn


    Move (SizeOfArray(ucIn)) to iSize1
    Set_Argument_Size iSize1


    Get Base64EncodeUCharArray of oCharTranslate ucIn to ucOut


    Move (SizeOfArray(ucOut)) to iSize2


    Move (UCharArrayToString(ucOut)) to sFile


    Move (StringToUCharArray(sFile)) to ucOut


    Get Base64DecodeUCharArray of oCharTranslate ucOut to ucOut2


    Move (SizeOfArray(ucOut2)) to iSize3


    Showln iSize1 " " iSize2 " " iSize3


    If not (IsSameArray(ucIn,ucOut2)) Begin
        Send Info_Box "Test Failed"
    End
End_Procedure




    Object oButton1 is a Button
        Set Location to 55 97
        Set Label to 'oButton1'
    
        // fires when the button is clicked
        Procedure OnClick
        //    Send TEST
            Send TestBase64EncodeUCharArray
        End_Procedure
    
    End_Object