Skip to Content
0
Former Member
Apr 09, 2009 at 08:24 AM

BSP FIle upload

18 Views

Hi,

I searched but could not find an answer...I am working on a program that itseems worked till the last few days...not sure why it stopped working suddenly. I was able to fix it now, but am wondering how to retrieve the old attachments uploaded using this app.

This BSP app is used to store documents.

Step-1:Simple BSP form upload. In the event handler, the cData is read using cl_http_entity->get_cdata. This is stored in a table as a string along with filename, file type etc.

Step-2: To download the document from Step-1, the string from Step-1 is converted to xstring using SCMS-STRING-TO-XSTRING and then the response is set using:

runtime->server->response->set_data( data = lxstringdata length = xstrtlen ).

This no longer works - it gives garbage data...

I converted it to read binary data while uploading (cl_http_entity->get_cdata) and it works fine now - but any idea on how I can read the files that have been created so far? I was told that it was working atleast a few days back..

Thanks in advance.

JH