Discussion:
DWfile and Image Files
(too old to reply)
fletc4her
2005-05-26 23:34:14 UTC
Permalink
I am trying to read in an image files using DWfile.read() so that I can post it
to a server using a multi-part form for HTTP file upload. The DWfile.read()
function always returns NULL for this file. However, I am able to copy the
file from place to place so I know that it exists and that Dreamweaver can
access it generally. Can the DWfile.read() function be used to read in binary
image files or just text files? Any other ideas of what might be going wrong?

Thanks

[fletcher]
danilocelic *TMM*
2005-05-27 01:20:26 UTC
Permalink
Post by fletc4her
I am trying to read in an image files using DWfile.read() so that I can post it
to a server using a multi-part form for HTTP file upload. The DWfile.read()
function always returns NULL for this file. However, I am able to copy the
file from place to place so I know that it exists and that Dreamweaver can
access it generally. Can the DWfile.read() function be used to read in binary
image files or just text files? Any other ideas of what might be going wrong?
Unfortunately, only good for text files.

BTW: How were you going to do a form upload from within a DW extension?
--
Danilo Celic
| Extending Knowledge Daily : http://CommunityMX.com/
| Team Macromedia for Dreamweaver : http://macromedia.com/go/team/
fletc4her
2005-05-27 01:57:40 UTC
Permalink
Post by danilocelic *TMM*
Unfortunately, only good for text files.
BTW: How were you going to do a form upload from within a DW extension?
I use MMHttp.postText(); It works fine for normal form content. To do the
file upload I set the post method to multipart/form-data and format the post
appropriately. But, without being able to get the binary contents of the image
file the whole technique is moot.

[fletcher]
danilocelic *TMM*
2005-05-27 04:08:38 UTC
Permalink
Post by fletc4her
Post by danilocelic *TMM*
Unfortunately, only good for text files.
BTW: How were you going to do a form upload from within a DW extension?
I use MMHttp.postText(); It works fine for normal form content. To do the
file upload I set the post method to multipart/form-data and format the post
appropriately. But, without being able to get the binary contents of the image
file the whole technique is moot.
Yep, it can't do file uploads.
--
Danilo Celic
| Extending Knowledge Daily : http://CommunityMX.com/
| Team Macromedia for Dreamweaver : http://macromedia.com/go/team/
Loading...