el5ateer
09-28-2006, 03:57 PM
I want to know a more clear reason for the error 31016 using FTP Plugins .. I use this code
------------------------------[[ SCRIPT: Page: Page1, Object: Button2, Event: On Click Script ]]------------------------------
-- Get the path of the image from the Input Object --
path = Input.GetText("Input1");
-- Separate Image Name from the rest of the Path --
psep = String.SplitPath(path);
-- Specify File name + Extension --
file= ""..psep.Filename..""..psep.Extension.."";
-- Connect to the FTP Server --
FTP.Connect("*******.*******.*******", "*******", "*******", "", true);
-- Navigate to the Folder of Upload --
FTP.ChangeDir("/****");
-- Check Whether a file with the same name and extension there --
exist = FTP.GetFileInfo(file);
-- If a file with the same name was found .. Error Message , Else, Upload --
if exist == nil then
FTP.Upload(path, file);
Dialog.Message("Image Uploaded Successfully", "Done, Image was uploaded .. Congrats.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);end
if exist ~= nil then Dialog.Message("Sorry", "File already exists .. Please rename the fgile and try to upload it again.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);end
FTP.Disconnect();
I get this error after "most of" FTP actions their .. I guess it has something to do with the FireWall or whatever .. but i want, please, a clear point of view (detailed if possible) :)
thnx and sorry for disturbance
Yours,
Galal
------------------------------[[ SCRIPT: Page: Page1, Object: Button2, Event: On Click Script ]]------------------------------
-- Get the path of the image from the Input Object --
path = Input.GetText("Input1");
-- Separate Image Name from the rest of the Path --
psep = String.SplitPath(path);
-- Specify File name + Extension --
file= ""..psep.Filename..""..psep.Extension.."";
-- Connect to the FTP Server --
FTP.Connect("*******.*******.*******", "*******", "*******", "", true);
-- Navigate to the Folder of Upload --
FTP.ChangeDir("/****");
-- Check Whether a file with the same name and extension there --
exist = FTP.GetFileInfo(file);
-- If a file with the same name was found .. Error Message , Else, Upload --
if exist == nil then
FTP.Upload(path, file);
Dialog.Message("Image Uploaded Successfully", "Done, Image was uploaded .. Congrats.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);end
if exist ~= nil then Dialog.Message("Sorry", "File already exists .. Please rename the fgile and try to upload it again.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);end
FTP.Disconnect();
I get this error after "most of" FTP actions their .. I guess it has something to do with the FireWall or whatever .. but i want, please, a clear point of view (detailed if possible) :)
thnx and sorry for disturbance
Yours,
Galal