|
#1
|
|||
|
|||
|
URL spaces
Hello all!! I'm a new user of TrueUpdate and i've a question for you:
I have to download multiple files from an FTP site. Some file has spaces in the name (like "hello all.exe") and the FTPWI library automatically convert it into "ftp://myserver/hello%20all.exe". Our web server does not recognize the "%20" in the name, and return an error code. Can i customize the FTPWI library so it don't convert the spaces into "%20"? |
|
#2
|
||||
|
||||
|
Hi Skyluke,
I have been looking into this and it appears as though encoding spaces in an FTP URL using %20 is an error, this bug will be fixed for the next release of TrueUpdate 2.0. In the mean time you can get around this problem by uploading the file to your FTP server without a space, and then using FTPWI to download the file to your users hard drive with a space. For example: Code:
FTPWI.Download("ftp://myserver/helloall.exe", "C:\\downloads\\hello all.exe", "user", "password");
__________________
MSI Factory The Next Generation Intelligent Setup Builder |
|
#3
|
|||
|
|||
|
Quote:
Server1 = 192.168.1.1 (our LAN server Server2 = 81.208.xxx.xxx Obviously our customers can't connect to 192.168.1.1 Thanks again for your help!! |
|
#4
|
||||
|
||||
|
Hi Skyluke,
Yes it is possible to know which server script you have downloaded. If you have used the project wizard to create your project then you will be able to check the value of: screen_globals.CurrentServerIndex right after the line: Code:
if(Screen.Show("Connect to Server") == SR_SUCCESS) then
So if you have Server1 and Server2 you would be able to tell which server file was being used by using the following code: Code:
-- Download and run the server script
if(Screen.Show("Connect to Server") == SR_SUCCESS) then
-- Get the list of TrueUpdate Server locations
local tableTrueUpdateServers = TrueUpdate.GetUpdateServerList();
if(tableTrueUpdateServers) then
strServerName = tableTrueUpdateServers[screen_globals.CurrentServerIndex];
if (strServerName=="Server1") then
--Server 1
elseif (strServerName=="Server2") then
--server 2
end
end
TrueUpdate.RunScript("Server Script");
end
__________________
MSI Factory The Next Generation Intelligent Setup Builder |
|
#5
|
|||
|
|||
|
Many many thanks! I did it in a similiar way: I've added 2 scripts called "Location1" and "Location2", each configures the FTP variables to connect with the correct server, and i used the CurrentServerIndex to launch the appropriate script!
Thanks 4all!! |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| GetURLFilename script, how to use spaces in URL's | gnetcanada | AutoPlay Media Studio 5.0 | 3 | 07-21-2004 02:57 PM |
| Function: Get Filename from URL | Brett | AutoPlay Media Studio 5.0 Examples | 0 | 05-31-2004 03:46 PM |
| Pass URL to Browser | Tux | AutoPlay Media Studio 5.0 | 1 | 04-06-2004 12:38 AM |
| HOW TO: Return a Web Browser Object to the Original URL after a Page Jump | Support | AutoPlay Media Studio 4.0 Examples | 0 | 02-03-2003 10:18 AM |
| HOWTO: Open an Internet URL in the Default Web Browser | Support | AutoPlay Media Studio 4.0 Examples | 0 | 09-18-2002 02:59 PM |
All times are GMT -6. The time now is 09:13 PM.






Linear Mode

