Help needed uploading image files ( 0kb issue )
kevin at stallibrass.com
kevin at stallibrass.com
Thu Sep 15 21:21:59 EDT 2005
I'm writing a small app to allow a collegue to easily update a web page. In
it's simplest form, there is one text box and one image to be changed.
I'm handling the text changes by inserting a javascript include script on
the web page and using this app to modify the text file it points to. The
files are updated by using:
put "document.write('" & fld "newtext" &"');document.write"into URL
"ftp://name:password@ftp.website.com/thefile.js"
This works fine, the problem comes with the images. My app imports any image
file and resizes it to fit the area available on the web page. I can use
export image "image1" to file "image1.gif" as GIF -- This works fine to
create the required file within the local folder
my problem is getting the image to the URL.. I've tried:
export image "image1" to URL
"ftp://name:password@ftp.website.com/image1.gif" as GIF -- The file appears
but is 0 kb
--libURLftpUpload URL "image1" to URL
"ftp://name:password@ftp.website.com/image1.gif" -- The file appears but is
0 kb
I've also tried variations of libURLftpUploadFile, and
--libURLftpUploadFile
myVariable,ftp://name:password@ftp.website.com/image1.gif" -- exporting
the file to a variable first.
even copying the correctly saved local file but with the same result
In each case, the file appears where I need it but it's empty - i.e. 0 kb
The image file I'm creating is correct as I can ftp it up to the site with
no problems (not a solution I can offer to my collegue)
I'm obviously missing something fundamental here that I can't stumble on in
the documentation so any help would be very gratefully recieved
Kevin S
More information about the use-livecode
mailing list