Extension Client FTP. Create Web Server, FTP Server in PC with small file 194 Kb

In this topic we are going to see:

  • How to create a Web and FTP Server on our PC with a small 194 Kb file.
  • A ClientFTP extension to upload and download files from our App to a PC.

http://kio4.com/windows/7B_smallwebserver.htm

1.- Download shttps_mg.exe (194 Kb) from http://smallsrv.com/

[Also for LINUX]

[In case the Chrome browser shows a danger warning, change .crdownload to .exe
fdfdfder
]

2.- Run shttps.exe

3.- Let's go to this folder:
servidorweb12

4.-Click http.exe and our web server will start.
[Perhaps the Windows Firewall window will appear indicating that you want to open port 80 to serve web pages. We accept.]

5.- We must know the local IP of our computer, for this we go to the Command Prompt (cmd) and write ipconfig.

6.- In the www folder we put our web pages and their images.

  • It is convenient that the initial page of our website is called index.htm

7.- Any user from our local network who writes our IP in a browser, for example 192.168.0.13, will observe our web page.

4 Likes

2.- Web Server Configuration.

In a browser we write:

**http://127.0.0.1/$_admin_$conf**

3.- FTP Server Configuration.

Uncheck Disable FTP server (Restart need)

  • Add users to FTP. Click on Users & Virtual Hosts.

  • Add juan.

4.- Extension KIO4_FTPClient.

com.KIO4_FTPClient.aix (285.8 KB)

p174C_extension_FTP.aia (320.2 KB)

5 Likes

It is convenient that the files are in the ASD.

Where is the www folder expected to be Juan?

1 Try
add to http.cfg ---> radmin

user=juan;1234;c:\shttps;PSHNWF
user=admin;1234;c:\shttps;A
radmin

Restart

2 Try this complete http.cfg

http.cfg
# General setting
limitlog=0
from_same_host=0
ip_range="1.0.0.1-254.254.254.254"
ip_deny=""
ip6_range="::1-FFFF:FFFF:FFFF:FFFF::"
ip6_deny=""
radmin
adm_range="127.0.0.1"
adm_deny=""
adm6_range="::1"
adm6_deny=""

# HTTP server setting
max=16
port=80
http_range="1.0.0.1-254.254.254.254"
http_deny=""
http6_range="::1-FFFF:FFFF:FFFF:FFFF::"
http6_deny=""
http_speed=0
http_spdusr=0
dir="C:\shttps\www"
def="index.*"
cgi_ident="\cgi-bin\"
fcgi_ident=".fcgi"
php="C:\PHP"
post_limit=196608
norunhtm
cgi_timeout=7936
header="Server: SHS"
gz_lib="zlib-1.dll"
gz_low=512
nogz_ext=".gif,.jpg,.jpeg,.gz,.zip,.rar,.arj,.jar"
ip_base="ipbase.bin"
http_ltime=0
http_ip_limit=0
http_net_limit=0
http_limit=0

# DNS server setting
dnscache=9216
dnstimeout=800
dns_range="1.0.0.1-254.254.254.254"
dns_deny=""
dns6_range="::1-FFFF:FFFF:FFFF:FFFF::"
dns6_deny=""
dns_detect_dos=40
dns_dos_hosts=""

# Proxy server setting
proxy_max=0
proxy=3128
proxy_time=24576
proxy_fsize=0
proxy_range="1.0.0.1-254.254.254.254"
proxy_deny=""
proxy6_range="FE80::-FEFF::"
proxy6_deny=""
proxy_speed=0
proxy_spdusr=0
proxy_tryes=8
proxy_same=0
upproxy_port=3128
nouphosts=""
bad_hosts=""
proxy_timeout=120
proxy_avport=3310
proxy_ltime=0
proxy_ip_limit=0
proxy_net_limit=0
proxy_limit=0

# FTP server setting
ftp_max=0
ftp_port=21
ftp_timeout=60
ftp_range="1.0.0.1-254.254.254.254"
ftp_deny=""
ftp6_range="::1-FFFF:FFFF:FFFF:FFFF::"
ftp6_deny=""
ftp_speed=0
ftp_spdusr=0
ftp_pasvp=0
ftpi_ltime=0
ftpi_ip_limit=0
ftpi_net_limit=0
ftpi_limit=0
ftpo_ltime=0
ftpo_ip_limit=0
ftpo_net_limit=0
ftpo_limit=0

# POP3 server setting
pop3_max=0
pop_port=110
pop_timeout=60
pop_range="1.0.0.1-254.254.254.254"
pop_deny=""
pop6_range="::1-FFFF:FFFF:FFFF:FFFF::"
pop6_deny=""
pop_speed=0
pop_spdusr=0
wmailsent="sent"
wmailtrash="trash"

# SMTP server setting
smtp_max=0
smtp_name="shttp.srv"
smtp_dns="127.0.0.1"
smtp_port=25
smtp_out="c:\outbox"
sent_time=24576
smtp_err="err"
smtp_range="127.0.0.1"
smtp_deny=""
smtp6_range="::1"
smtp6_deny=""
smtp_msg_limit=1048576
blacklist=""
msgspam="Message detected as SPAM"
run_timeout=64
fake=""
spam_time=0
smtp_ltime=0
smtp_ip_limit=16777216
smtp_net_limit=16777216
smtp_limit=16777216
time_btw=3

# DHCP server
dhcp_max=0
dhcp_ip="192.168.0.1"
dhcp_bcast="255.255.255.255"
dhcp_first="192.168.0.20"
dhcp_mask="255.255.255.0"
dhcp_gate="192.168.0.1"
dhcp_dns="192.168.0.1"
dhcp_name="SmallSrv.local"
dhcp_file="dhcp"

# TLS/SSL server
tls_max=0
tls_port=443
ssl_range="1.0.0.1-254.254.254.254"
ssl_deny=""
ssl6_range="::1-FFFF:FFFF:FFFF:FFFF::"
ssl6_deny=""
tls_speed=0
tls_spdusr=0
tls_lib="seclib.dll"
tls_cert_file="server.pem"

# Other
user=juan;1234;c:\shttps;PSHNWF
user=admin;1234;c:\shttps;A
radmin

3 Try click in icon in Notification Area Windows.

trtrtrtrtret

That did it Juan! Thanks.

After the photo is taken, I want to upload it to the ftp server but I get an error.


WiCDw6yMSw2vChn3p77log

and the error is ?

Failed to upload the file

pls help

You do not say wherer this error message is coming from ?

You do not show all your relevant blocks

  1. Have you got the FTP server setup correctly and working on your local computer ?

  2. Are you able to connect to the ftp server from your app ?

Use Do it to check, if the path is correct

Screenshot_20240109_150021_DuckDuckGo

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

It doesn't work that way

ftp
ftpcon

You should answer the questions that are asked by @TIMAI2 and @Taifun. If not it will be very hard to help you. Just stating that is doesn't work is not enough info.

Show us the Do it result
Taifun