cancel
Showing results for 
Search instead for 
Did you mean: 

Alternative to FTP to transfer images

Amey-Mogare
Contributor
0 Kudos

Hi,

I am using FTP transfer to access image files (size > 1.5MB) from a FTP server. ( image file will be uploaded in one the Web Dynpro view)

As FTP is having limited connection capacity, is there any other way to transfer files from one machine to other?

Any comments on this are most welcome..

Regards,

Amey

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Amey,

if scp is installed on the machine running netweaver you can start the tool from within java code with a ProcessBuilder or use a native java implementation (3rd party library) such as [JSch|http://www.jcraft.com/jsch/index.html].

regards,

Christian

Amey-Mogare
Contributor
0 Kudos

Hey Christian,

Thank you so much for the new clue.

Can you tell me how do I use this SCP in my web dynpro code??

I'll upload image file as photo element in a view.

Where will i get these libraries required?

I want to upload n download .JPG files from remote server. file size may range from 1MB to 20MB...

I'll get the URL of the directory in which files are to be copied.. This location can change from time to time (on same machine, but directory may change). Following is the code i'm using:-

FtpURLConnection myConnection = new ftpURLConnection(myUrl);

myConnection.connect();

OutputStream out = myConnection.getOutputStream();

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

out.close();

myConnection.close();

Pls let me know how to use this SCP...

Thanks n Regards,

Amey

Former Member
0 Kudos

Hi Amey,

another option might be SCP (Secure Copy) which is incorporated into the SSH-Suite.

If capacity is a problem and unix the OS, you might try splitting those files and reassembling on the other side.

regards,

Christian

Amey-Mogare
Contributor
0 Kudos

Thanks a lot Christian,

But tell me one thing, does Java support this protocol? The size of my image files wont b too large. It will range form 1.5 MB to 10 MB

I want to perform uploading and downloading through java code in web dynpro. Will it be possible?

Any comments on this are most welcome.