Re: Scripting Fetch?
Re: Scripting Fetch?
- Subject: Re: Scripting Fetch?
- From: Michelle Steiner <email@hidden>
- Date: Tue, 19 Dec 2000 08:24:42 -0800
On 12/19/00 2:30 AM, Nick Middleweek <email@hidden> wrote:
>
>
I've had problems with uploading a file using the Url Access Scripting
>
extension but if I use Fetch manually it seems to work? I'm uploading to a
>
Unix ftp server.
This one works for me.
property FileName : ""
property gDesturl : ""
property theFile : {}
if theFile is {} then set theFile to {} & ,
(choose file with prompt "Please choose the file to upload." of type
{"JPEG"})
if gDesturl is "" then specify_destination()
repeat
with timeout of 600 seconds
tell application "Fetch 3.0.3"
put into url gDesturl item theFile binary format Raw Data
end tell
end timeout
set oldtime to newtime
on specify_destination()
set dialog_reply to display dialog "Enter Destination URL in format:" &
return & ,
"
ftp://user:password@host/path/" default answer gDesturl
if button returned of dialog_reply = "OK" then
set gDesturl to text returned of dialog_reply
end if
end specify_destination
----------------------------------------------------------------------
| Michelle Steiner | Hard as it may be to believe, my |
| email@hidden | life has been based on a true story. |
----------------------------------------------------------------------