FTP Extension issue

134 views
Skip to first unread message
Assigned to taifu...@gmail.com by akshay....@gmail.com

Huntrox

unread,
Oct 15, 2016, 2:49:47 AM10/15/16
to MIT App Inventor Forum
Hallo,

i am using the ftp-extension from taifun. Almost it's working fine, but sometimes the images
have errors after download. The images are painting in canvas and then they are uploading with
ftp-extension. On ftp-server the images looks fine. After downloading with ftp-extension sometimes
they have errors. I use jpg-format.
After changing to png. I can upload the images, on ftp-server all is fine. After downloading
i can't open any png-file (error). 
What can i do?
onpaintappandftpserver.PNG
afterdownloading.PNG

Akshay

unread,
Oct 15, 2016, 4:26:31 AM10/15/16
to mitappinv...@googlegroups.com
Hello,

Looks like images aren't getting downloaded properly. Is your internet connection working fine?, Does the FTP server close the connection after some time during the transfer?, Does this happen only with a specific set of images, every time? or it's happening randomly?

Regards.

Huntrox

unread,
Oct 15, 2016, 4:57:23 AM10/15/16
to MIT App Inventor Forum
Hello Akshay,

thanks for answer. First i thought it was randomly, but now i find out, the issue is only on local ftp-server (different manufacturers, for example synology). I  tried every setting, but images looks like in first posting. Sometimes the images have no error, but i find out that images with many lines in same colour makes issue more often.
(I need local server for better performance.)

Huntrox

Huntrox

unread,
Oct 15, 2016, 5:03:29 AM10/15/16
to MIT App Inventor Forum
even a hint:
on local ftp-server the images are uploaded well (no errors), after downloading the images have the same errors on every device.

Akshay

unread,
Oct 15, 2016, 6:31:18 AM10/15/16
to mitappinv...@googlegroups.com
Thanks for the reply. It looks strange as to why it happens like that. Taifun, the developer of this extension is on a vacation now, and will return in a few days. He'll be in a better position to answer this. Let him have a look at this and suggest a solution. Until that, I request you to kindly wait for other developers to look at this.

Regards.

Huntrox

unread,
Oct 15, 2016, 6:46:28 AM10/15/16
to MIT App Inventor Forum
thank you for the moment

Huntrox

Taifun

unread,
Oct 15, 2016, 9:45:51 AM10/15/16
to MIT App Inventor Forum
but now i find out, the issue is only on local ftp-server (different manufacturers, for example synology)
this seems to be a Synology issue then
unfortunately I don't know, which Synology settings you have to use to avoid this, you might want to ask in the Synology forum

alternatively you could try the web component to download your files, see this example https://puravidaapps.com/filebyfile.php

Taifun

Huntrox

unread,
Oct 15, 2016, 11:16:28 AM10/15/16
to MIT App Inventor Forum
Thank you Taifun for response

it's also on other local ftp-server (professional system in school, no synology).
I use ftp-extension version 3 (not 3a), it's the only extension i used in app.
I hope you find a solution :-)

Huntrox
 

Taifun

unread,
Oct 15, 2016, 1:13:36 PM10/15/16
to MIT App Inventor Forum
sorry, I can't help you with that, I do not have a NAS to do some tests

I now added this as "Known Issue" on my webpage

use the file to file download method as workaround...

Taifun

Huntrox

unread,
Oct 16, 2016, 5:58:25 AM10/16/16
to mitappinv...@googlegroups.com
Dear Taifun,

now i tried FileZilla Server on Windows 7. Same results. That's not an issue with NAS,
only a localhost-issue. I find no setting to disable the image errors. On a freeware ftp-server
anything is fine, but to slow for me. I need 16 images as quickly as possible.
What is different between online and offline ftp-servers?

The file "example.jpg" looks well, but this file always causes errors. It's directly from ftp-server (downloaded with filezilla,
not with app). The images from first posting are only screenshots.

I would appreciate an answer.

Huntrox


example.jpg

Taifun

unread,
Oct 16, 2016, 12:36:50 PM10/16/16
to MIT App Inventor Forum
 That's not an issue with NAS, only a localhost-issue. 
which means, it's not an issue of the extension... btw. the extension is more or less "stupid", it just uses the Apache Commons Net 3.4 library...

 On a freeware ftp-server anything is fine, 
yes, the purpose of the extension is to use it together with an online ftp server

What is different between online and offline ftp-servers?
unfortunately I do not know, probably it's a Windows issue?

The workaround for you currently is to use the web component to download your files, see this example https://puravidaapps.com/filebyfile.php

 I need 16 images as quickly as possible.
why don't you store all your images on your device? you could download them all on first run of your app... this is the fastest solution...

Taifun

Abraham Getzler

unread,
Oct 16, 2016, 3:31:20 PM10/16/16
to MIT App Inventor Forum
The ftp protocol needs to be explicitly instructed that its file transfer is to be binary.
The cited library says it assumes "ascii", which means it might be doing
cross/architecture CRLF/LF translation, which could cause visible artifacts in
a binary image file.

I'm not familiar with the extension in question.

Does it have a place to specify a binary transfer?

ABG

Taifun

unread,
Oct 16, 2016, 6:30:10 PM10/16/16
to MIT App Inventor Forum
thank you ABG!

I looked again at the code and had to find out, that I'm using the flag UseFileTypeBinary only during Upload, but not during Download...
I will update the extension...

Taifun

Huntrox

unread,
Oct 17, 2016, 12:27:59 AM10/17/16
to MIT App Inventor Forum
Great news, many thanks to Taifun and ABG!!!

Huntrox
Reply all
Reply to author
Forward
0 new messages