Upload File To Website
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Upload File To Website
For some reason, I cannot upload a file using the libURLftpUploadFile. I keep getting errors connecting to my website. Can I upload a file using something similar to the command:
put "work.db" into url "ftp://user:password@ftp.website.com/work.db"
When I try the above command, I get a file on my website called work.db (which is correct...so I am able to connect), but the contents of the file are "work.db". I want to upload a file called work.db.
Anyway to modify the above command to upload a file?
Thanks,
Warren
put "work.db" into url "ftp://user:password@ftp.website.com/work.db"
When I try the above command, I get a file on my website called work.db (which is correct...so I am able to connect), but the contents of the file are "work.db". I want to upload a file called work.db.
Anyway to modify the above command to upload a file?
Thanks,
Warren
Hi Warren,
try:
put url "file:work.db" into url "ftp://user:password@ftp.website.com/work.db"
Best,
Tim.
try:
put url "file:work.db" into url "ftp://user:password@ftp.website.com/work.db"
Best,
Tim.
Great place for solutions...hope this gets trought too...
On Windows XP, I upload several files and folder to a web server (the Host of my web pages, RedLinux).
My function script:
Everything works fine except that after the script has ended and everything has been upload and the web page is fine, the local folder gets locked (...file in use) and I cannot delete it (must close Revolution).
I tried a ResetAll (but I need to keep other sockets open...), I tried to wait some more but no result.
Can someone help me ?
On Windows XP, I upload several files and folder to a web server (the Host of my web pages, RedLinux).
My function script:
Code: Select all
function SendToWeb userName userPassword PathFrom PathDestination --this is called from a loop that mymics a local folder with a folder on the web host
set the defaultfolder to PathFrom
put the files into ListaFiles --this list all the files on the local folder
set the itemdelimiter to "."
repeat for each line TheFile in ListaFiles
if last item of TheFile = "html" or last item of TheFile = "png" or last item of TheFile = "css" or last item of TheFile = "js" then --just the valid files (no OSX stuff)
if the visible of stack "attesa" is false then --stack "attesa" keep the user informed on the transfer
return empty
end if
if last item of TheFile = "html" then --I tough I should distinguish...
put "file:" into Prefisso
else
put "binfile:" into Prefisso
end if
put Prefisso & PathFrom & "/" & TheFile into PathFromWhere
libURLSetStatusCallback "myProgress",the long ID of scrollbar "ScrollbarTC" of stack "attesa"
put "ftp://" & URLEncode(userName) & ":" & URLEncode(userPassword) & "@" & PathDestination & "/" & TheFile into PathDestinationWhere
put url PathFromWhere into url PathDestinationWhere
put the result into errore
if errore is not empty then
return errore
end if
end if
end repeat
end SendToWebI tried a ResetAll (but I need to keep other sockets open...), I tried to wait some more but no result.
Can someone help me ?
Solved (locked folder)
Thanks to another post I solved the problem.
Before deleting the folder(s), I set the "Defaultfolder" to a different folder...
Trevix
Before deleting the folder(s), I set the "Defaultfolder" to a different folder...
Trevix