Converting HTTP to FTP URL
J. Landman Gay
jacque at hyperactivesw.com
Sun Aug 7 23:49:52 EDT 2011
On 8/7/11 10:05 PM, Jeffrey Massung wrote:
> So, the only way you can begin to solve this issue is if you have direct
> access to the web server and know how it's routing and serving static
I'll answer you and Mark Weider at the same time. I'm trying to add
auto-upload to AirLaunch. It mostly works. I can only upload via ftp
(http isn't usually accepted, I don't think, even if you provide a name
and password. At least, it doesn't work on my hosted account.) There is
already a place in the stack for the user to enter the http URL where
their installation files will be downloaded from. That URL is required
for setting up the wi-fi installation, so AirLaunch already has that.
I could ask the user for a separate FTP upload URL but I'd rather not if
I don't have to. What would be better is to take their HTTP URL and
convert it to a valid FTP URL which will only be used internally by
AirLaunch to get their files onto their server.
On both my main hosted server and at my site on on-rev, changing the
htpp URL works if I add "www" after the domain part of the path. That
allows an ftp upload to resolve the www alias, and the rest of the path
is the same as the http URL. Easy, and no hassle for the user.
But when testing with a subdomain, that method creates a new "www"
folder inside the subdomain, which isn't what's wanted. So I'd like a
generic way to create a valid FTP path from a known HTTP path, one that
works with primary domains as well as subdomains.
It sounds like I may have to ask the user to provide both paths. But
that makes everything more complex because the two paths are slightly
different, the user needs to know the distinction between web-relative
paths and absolute paths and what their web root folder is called, and
I'd rather avoid the support issues around that if I can.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the Use-livecode