FTP only works when connected to WiFi

My App is designed to take a picture and post it straight to a FTP server. The App then submits the image’s URL to an API service and get a json in response.
It works perfectly when connected to my WiFi but the FTP part fails when I disconnect from WiFi and use the GSM network, FTP transfers nothing.
The relevant part of the App is as below.

Any way out of this?
Thanks

Did You use When upload error block ?

No, I see no errors on the upload itself, errors come after some time as a result of the image file not been there.
If I use filezila to monitor the destination folder at the FTP server I can see the file arriving when I use WiFi but see nothing when I switch off WiFi.
After FTP times out the App goes ahead and transfers the imageName via http and when the API notices imageName is not where it is suposed to be then I see an error.

As a reference I replaced Kodular FTP by PuraVita FTP and it works perfectly both with WiFi and GSM but has a feature that, so far, is preventing me using it.

So, the problem is with Kodular FTP that, for some reason, refuses to work with a GSM connection.

Thanks

1 Like

What feature are you talking about?
Taifun

Hi, with Kodular FTP there is a way to define the name the file will be given at the destination.
With Taifun FTP the filename is the one at the source.
When I take a picture and send it immediately to the FTP extension it always have the same name NewFile.png. The file at the FTP server is also NewFile.png.
That will result in collisions when more than one user is using the App.
I need to be able to assign unique names at destination to avoid this sort of collisions.

You could rename the file using the file component or one of the file extensions before uploading…

Taifun

1 Like

Yes, I tried that but did not succeed.
I used the built in File component and tried to COPY first and then the MOVE just replacing the file name and leaving the path so I could latter delete the new name but in both cases I get a message of some access denied. I don´t know how to solve this.

Copy it to the ASD and upload it from there
And if you get stuck, post a screenshot of your relevant blocks…

Taifun

OK, may be it is of relevance: I kept testing and I found that the “AFTER CAMERA” image comes with unique names (kodular_1635713102578.jpg), it is the IMAGE EDITOR that renames the files to NewFile.png. My problem is that the camera image is too large for my purpose and takes a long time to transfer. A gray scale 320x240 pixels image does what I need.
Before I try to rename newimage.png again I will try to find some extension that can do its work without renaming the files.

Comment added:
I see you have a Image Extension that can crop the image, I still don’t know how it deals with file names.

Thanks

what about setting the Save New Image As property of the image editor component?

Taifun

Save New Image As…
I am only opening your message now but already sorted it out with your Image Extension as below:


I used TaifunFTP and TaifunImage that preserves a unique file name and the main problem of been able to use the App with GSM was solved.
Thanks

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.