Discuss (FTP) and (SFTP, FTPS and SCP), our Java file transfer clients.
no avatar
User

Oysterman

Posts

2

Joined

Sat Apr 18, 2009 7:20 pm

Having trouble uploading data (unexpected server replies?)

by Oysterman » Sat Apr 18, 2009 7:51 pm

I've recently discovered edtFTPj and I'm trying to use it in an application I'm developing. At first glance it looked very neat, but unfortunately I'm experiencing some trouble.

I've been trying to use v2.0.4 for downloading and uploading images to a test account. It would seem that edtFTPj and the FTP servers I've tried to work with do not play ball. Apparently edtFPTj expects different replies than the ones it gets (at least that's what I got from browsing the source lines that generated the errors).

Downloading image files works just fine, but uploading does not.

I've tried:
* FileZilla and Xlight FTP servers.
* Active and passive transfer modes.
* Uploading using a stream, and uploading a temporary file from disk.

Test class source code:
http://pastebin.com/m69949e35

Logs (with Xlight as server):

Active mode, using stream:
http://pastebin.com/m2558c043

Active mode, using temporary file:
http://pastebin.com/m67ae41a9

Passive mode, using stream:
http://pastebin.com/m751ef17b

Passive mode, using temporary file:
http://pastebin.com/m34af738c

Is it something I'm doing wrong? Or is edtFTPj not compatible with the servers I used? Which servers do work for everyone?
no avatar
User

Oysterman

Posts

2

Joined

Sat Apr 18, 2009 7:20 pm

by Oysterman » Sat Apr 18, 2009 8:55 pm

It seems I have solved the problem, and it was my own fault after all. :)

I was not closing the InputStream after reading the image. Now that I do, it appears to be working fine.

Who is online

Users browsing this forum: No registered users and 25 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign