Unable to upload using FTP

Hi Koders,
I am trying to upload an image from my app to the server using FTP. After picking the image by image picker, I send connect command and I am connected successfully (as connection status outputs TRUE), but after using upload file block for uploading the image, It shows an empty error and image does not upload. Please Help

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
to find out the value of Image1.Picture
Unbenannt
Taifun

1 Like

Hello @Taifun,
Thanks for replying but I already tried doing so and it shows correct path. I have now tried with simple blocks in new test project but it is still not working…
See the screenshot

probably the FTP component needs the full path, which starts with file:///storage/emulated/0/…?
Taifun

@Taifun It’s still not working.
It shows error on mobile file:/storage… (no such file or directory)


Notice the difference in paths on Kodular builder and phone
On Builder, it starts with file:///
while on phone, it is only left with file:/

Hello @Taifun,
Is there any other way in which I can send Images to my server?

YOu have an extra / there

**image **

join file:// . not file:///

1 Like

Hi @cian ,
I have already tried that. That’s also not working .

1 Like

test it in a apk and not with the companion.

Tried with APK also, not working

as it already has been said, use file:///… rather than file:////
also the space in the directory could be an issue… try to upload from the root directory and in case that works, replace the spaces by %20

Taifun

do you have file/folder permission

/Boban

I have FTP working fine. I pic an image, upload it. If it uploads OK a button shows up. Click the button, it will download it and show the image.

Here is an AIA with it fully working.

list.aia (2.8 KB)

Sorry @cian,
Your I compiled your AIA to APK but it’s not working.
Can it be problem on device?
I have Oppo A3s running Android Oreo.

Nope, I just tried it again on companion and it works. What is not working?

Read the blocks and see where all the notices get posted. What error is it.

Is Anything uploaded on your server. I have tried uploading many images. I am not getting Upload done alert.
And I have added On Upload Error block to get the error message in you list AIA, the app shows empty error.

Mate my Aia works with no changes loom at the blocks.

Just use my Aia and go fro there I tried it just now and it worked

I have also tried it without any changes, is there any change in files on your server.

Either it is a bug in the FTP component or that it doesn’t work well with all android version as it should

/Boban

Hello @Boban,
Is FTP working for you?
Have you tried ?