I have to write an upload functionality.But in one page I have to handle several uploads(here I assumed 4) at the same time.
Right now I can get the data from the user with that method.
appended variable holds the data for each upload division that I have in my BSP so depending on the user input I have to show or hide the uploads to the user.
So as you understand I can have maximum lets say 4 uploads in one page.The point where I have marked with xxxxxxxxxxxx as you saw in the sourse code, I would like to handle the document to save to a folder that I want to.I found some source codes in the net where I can send it back to the user with response but I want to save it to a folder, which is already defined.
So how can I handle it in part xxxxx or is there a better way to handle several uploads in one time and at the same time transferring the files to a folder structure
with their definitions.
DATA: fileUpload TYPE REF TO CL_HTMLB_FILEUPLOAD,
c1(10) TYPE c VALUE 'myUpload_',
appended(15) TYPE c.
do 4 times.
CONCATENATE c1 number_of_clicks INTO appended.
fileUpload ?= CL_HTMLB_MANAGER=>GET_DATA(
request = request
id = 'appended'
name = 'fileUpload' ).
file_name = fileUpload->file_name.
file_mime_type = fileUpload->file_content_type.
file_length = fileUpload->file_length.
file_content = fileUpload->file_content.
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
number_of_clicks = number_of_clicks + 1.
enddo.
Your helps will be appreciated.I really have 1 days of time.Please help about the topic.
Best Regards,
Goekay