Upload an Download Problem^^
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Upload an Download Problem^^
Very strange indeed.
I see a last source of problem : the exact filepath of the file located on the FTP server. You're talking about "test.zip".
If your FTP server is XX.XX.XX.XX are you sure that "test.zip" can be found in XX.XX.XX.XX/test.zip ?
And another thing that could help you : change the downloadComplete handler, by adding the status (parameters back). You'll see if the error is coming from the FTP server.
on downloadComplete pURL, pStatus
answer pURL
answer pStatus
hide scrollbar "progressbar"
end downloadComplete
I see a last source of problem : the exact filepath of the file located on the FTP server. You're talking about "test.zip".
If your FTP server is XX.XX.XX.XX are you sure that "test.zip" can be found in XX.XX.XX.XX/test.zip ?
And another thing that could help you : change the downloadComplete handler, by adding the status (parameters back). You'll see if the error is coming from the FTP server.
on downloadComplete pURL, pStatus
answer pURL
answer pStatus
hide scrollbar "progressbar"
end downloadComplete
-
- Posts: 76
- Joined: Sat Nov 07, 2009 7:43 pm
Re: Upload an Download Problem^^
Well I contacted Klaus and he found out that my Downloadlink is correct but the FTP Server adds an Underscore to the Downloadlink and gives error 550 Can't open /lego/newmod2.zip_: No such file or directory back.
Correct Link I send: ftp://xxx:xxx@ftp.xxx.org/lego/newmod2.zip
Link I get back ftp://xxx:xxx@ftp.xxx.org/lego/newmod2.zip_
If anyone has an Idea why the server adds an underscore after my Downloadlink please tell me. I also took an indeep look into my scripts and nowere is an Underscore contained, so my scripts shouldn´t be the error.
Any help will be appreciated,
Masterchief
Correct Link I send: ftp://xxx:xxx@ftp.xxx.org/lego/newmod2.zip
Link I get back ftp://xxx:xxx@ftp.xxx.org/lego/newmod2.zip_
If anyone has an Idea why the server adds an underscore after my Downloadlink please tell me. I also took an indeep look into my scripts and nowere is an Underscore contained, so my scripts shouldn´t be the error.
Any help will be appreciated,
Masterchief
-
- Posts: 76
- Joined: Sat Nov 07, 2009 7:43 pm
Re: Upload an Download Problem^^
So, today I got an answer to my questions and this is the mail:
Thanks to the support I got a hint and asked the Hoster but they can´t do anything about it (for security reasons) and so I would like to know how I could script the method the support describes here:
Best Regards,
Masterchief
"Dear Masterchief,
However, if the server is adding an underscore, then there is nothing Rev can do.
The issue is with the server and you will need to contact their admin to see why
it happens. Your script can remove the underscore though. Before you try to
download, check to see if there is an underscore before the final dot (".") and if
so, just remove it."
Thanks to the support I got a hint and asked the Hoster but they can´t do anything about it (for security reasons) and so I would like to know how I could script the method the support describes here:
Well I don´t have a clue to that and if anybody could give me a hint, it will be appreciated."Your script can remove the underscore though. Before you try to
download, check to see if there is an underscore before the final dot (".") and if
so, just remove it"
Best Regards,
Masterchief
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Re: Upload an Download Problem^^
Stripping off the underscore can be done using this function:
HTH,
Jan Schenkel.
Code: Select all
function RemoveUnderscoreBeforeExtension pPath
local tPath, tFile
--
put pPath into tPath
set the itemDelimiter to slash
put the last item of tPath into tFile
set the itemDelimiter to "."
if the number of items in tFile > 1 and the last char of item -2 of tFile is "_" then
put empty into the last char of item -2 of tFile
end if
set the itemDelimiter to slash
put tFile into the last item of tPath
return tPath
end RemoveUnderscoreBeforeExtension
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Re: Upload an Download Problem^^
Hi Jan and all,
that is just too easy!
This is the real problem, and this is nothing we can change so far!!!!!
Klaus
that is just too easy!
This is the real problem, and this is nothing we can change so far!!!!!
Best...but the FTP Server adds an Underscore to the Downloadlink and gives error
550 Can't open /lego/newmod2.zip_: No such file or directory !!![]()
![]()
![]()
back.
Correct Link I send: ftp://xxx:xxx@ftp.xxx.org/lego/newmod2.zip
Link I get back ftp://xxx:xxx@ftp.xxx.org/lego/newmod2.zip_
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Re: Upload an Download Problem^^
Ah, heh, I should have read the complete history, not just the last entry where MasterChief copied the reply from support and was asking how to strip off an underscore before the extension. Well, it's all up to the server admin then...
Jan Schenkel.
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
-
- Posts: 76
- Joined: Sat Nov 07, 2009 7:43 pm
Re: Upload an Download Problem^^
Well I didn´t solve the problem but I got it working using http instead ftp. I don´t know why but I had just to change ftp:// into http:// and now it works.
Thanks everyone who helped me;)
The last thing I would like to know is the fact that contains the filepath where the new file should be stored but how can I embend the original filename into the filepath?
I would assume to do it with
But I am not sure. (I will give it a try when I got home^^)
Best Regards,
Masterchief
Thanks everyone who helped me;)
The last thing I would like to know is the fact that
Code: Select all
libURLDownloadToFile myFile,newPath,"downloadComplete"
I would assume to do it with
Code: Select all
put "C:\myApp" into tpath
put tFilenameToDownload after tpath
libURLDownloadToFile tFilenameToDownload,tpath,"downloadComplete
Best Regards,
Masterchief