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
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 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:/
Is there any other way in which I can send Images to my server?
YOu have an extra / there
join file:// . not file:///
Hi @cian ,
I have already tried that. That’s also not working .
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
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)
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