cancel
Showing results for 
Search instead for 
Did you mean: 

Image Upload probelm - Very Urgent. Pls help!!!

Amey-Mogare
Contributor
0 Kudos

Hi All,

I am facing very strange problem while uploading a image file (.JPG file) thru a web dynpro view.

I am accepting a image file from view and uploading it to a ftp server.

There are two abnormal results I have observed. It does NOT happen for every image upload. But it has been observed to happen during peak Internet hrs. (image size can range from 1MB to 7-8 MBs)

When 'Upload' button is clicked, one of the following thing happens:-

1. After taking loooong time (processing circle rotates), browser screen goes totally blank. That is, browser goes into state as if no page is opened (white screen)

2. After taking loooong time, empty form re-appears. ( ie the view in which i had submitted data and pressed 'Upload')

I have tried tracing errors in default trace. but no error or exception is displayed !!!

Following is the code i'm using for uploading file. ==>

try {

URL myUrl = new URL("ftp://<some address>");

FtpURLConnection myConnection = new FtpURLConnection(myUrl);

myConnection.connect();

OutputStream out = myConnection.getOutputStream();

out.write(wdContext.currentPhotosElement().getPhoto1());

out.close();

myConnection.close();

} catch (Exception e) {

System.err.println("\n\n$$$$$$$$$$$$$Exception in image upload $$$$$$$$$$$$$\n\n");

e.printStackTrace();

}

Please help me as this system is live and lot of users are complaining as they are not able to upload their images..

Awaiting for reply ..

regards,

Amey

Accepted Solutions (0)

Answers (2)

Answers (2)

Amey-Mogare
Contributor
0 Kudos

Actually the problem was in HTTP READ TIMEOUT.. it was very less ie 10secs.. This is very much insufficient for slow clients. Changed it to 3 mins !!!

markus_doehr2
Active Contributor
0 Kudos

I suggest you check your ftp servers capacity (maximum number of connections etc.) and also the logs on it.

Markus

Amey-Mogare
Contributor
0 Kudos

Hi,

Does anybody have any idea about how the file data (byte stream) flows from Client's machine browser to Web Dynpro's context's element??

As per my observation and tracing, it is first loading byte array frm client's machine to view's corresponding context node.. And then only it is proceeding with further actions.

Now in my case, user may upload files ranging frm size 6MB to 10MB, web dynpro application either refreshes or times out during this transfer. I didnt even started FTP process to upload byte[] to remote server !!!

So how can we increase this speed of transfer from client's machine to context element ??

regards,

Amey