Appinventor FTP to Web Server

4,752 views
Skip to first unread message

Junaid Kapadia

unread,
Apr 14, 2013, 3:20:40 PM4/14/13
to ai...@googlegroups.com
Hello All, 

I am trying to create an FTP page in Appinventor so I can upload and download files to a mobile device from my web server. 

Going through the forums I have read about Appinventor not supporting it but it could be done via 3rd-party application that you can open via ActivityStarter. 
Is this true and is this really the only way?

I only ask again because I've read through some outdated posts. If anyone is aware of a certain solution (direct or indirect) your tips and suggestions would be most appreciated! 

Sincerely, 
J.K

Gary

unread,
Apr 15, 2013, 4:51:19 AM4/15/13
to ai...@googlegroups.com
If you decide to go the Activity Starter route, say something here.

Gary

Taifun

unread,
Apr 15, 2013, 9:15:18 AM4/15/13
to ai...@googlegroups.com
probably this helps
- how to upload a file http://puravidaapps.com/postfile.php
- how to download a file http://puravidaapps.com/filedownload.php
Taifun

Junaid Kapadia

unread,
Apr 16, 2013, 11:14:21 PM4/16/13
to ai...@googlegroups.com
Oh Boy! I mean to write "upload files from my mobile device to a web server!"

Nevertheless, Taifun your post has helped me overcome some other issues. Thanks mate! 

The uploading to a web server issue still stands.

Taifun

unread,
Apr 17, 2013, 8:06:51 AM4/17/13
to ai...@googlegroups.com
The uploading to a web server issue still stands.
why? did this solution http://puravidaapps.com/postfile.php not help?
Taifun

Tyler VanProoyen

unread,
Apr 1, 2015, 1:22:57 PM4/1/15
to ai...@googlegroups.com
Try this if you wish. You can upload any file that you wish.

ftp code:

<?php
$server = $_GET["servername"]; //address of ftp server (leave out ftp://)
$ftp_user_name = $_GET["username"]; // Username
$ftp_user_pass = $_GET["password"]; // Password
$source = $_GET["source"];
$dest = $_GET["destination"];
$mode="FTP_BINARY";

if(isset($server)) {
$connection = ftp_connect($server);

$login = ftp_login($connection, $ftp_user_name, $ftp_user_pass);

if (!$connection || !$login) { die('Connection Attempt Failed!'); }

$upload = ftp_put($connection, $dest, $source, FTP_BINARY);

if (!$upload) { echo 'FTP upload failed!'; }

ftp_close($connection);
echo 'Done';
}
else {
    echo 'Set Server Address';
}
?>
App Inventor FTP Code.PNG

Mazellan Ko

unread,
Oct 1, 2016, 3:37:37 AM10/1/16
to App Inventor for All
Hi, Tyler.
I have a question in AppInventor blocks.
There is "fileLocation.Text" In your block image.
What is fileLocation? 
Is it kinf of label?


2015년 4월 2일 목요일 오전 2시 22분 57초 UTC+9, Tyler VanProoyen 님의 말:

Thomas Meisl

unread,
Oct 17, 2016, 4:34:14 AM10/17/16
to App Inventor for All
And when i want to download a file to the tinyDB for example a mp3? I did this. it works but i can´t find the files again because the names of the downloaded files are changing after the download. Big Problem for me. Maybe you have a solution or a tutorial?

Thanks for your help

Thomas

Taifun

unread,
Oct 17, 2016, 11:18:39 AM10/17/16
to App Inventor for All
@Thomas: set the parameter Web.ResponseFileName to your needs
Taifun


Dario Alessandro

unread,
Feb 27, 2017, 9:29:16 AM2/27/17
to App Inventor for All
DOVE SI METTE QUESTO CODICE IN APP INVENTOR?

Taifun

unread,
Feb 27, 2017, 9:51:34 AM2/27/17
to App Inventor for All
this is a php script, which you have to put onto your server
probably the ftp extension https://puravidaapps.com/ftp.php would be the easier solution for you...

Taifun

Reply all
Reply to author
Forward
0 new messages