DWfile and Image Files

Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  1. #1

    Default DWfile and Image Files

    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]


    fletc4her Guest

  2. Similar Questions and Discussions

    1. DWfile.copy dies after the 1023 file
      I have an extension that copies files from the Dreamweaver site folder to a staging folder using a recursive copy function. After copying 1023...
    2. DWfile.copy not working
      I have an extension that I am building and I need to copy a file automatically from the config folder to the users local site when they apply the...
    3. DWfile.write returning 0
      I'm trying to create a temp file for my extension, but it isn't working, here is the code I'm using. ...
    4. Compare current date with DWfile.getCreationDate/Obj
      Hey everyone! I have a new questions. I was curious if anyone already has a created function that will convert e current date into the hex format...
    5. Macintosh OS X Path Problems when using DWfile.exists
      Hello, When working with a MACINTOSH OS X and when I try to do either a DWfile.exists( dreamweaver.getConfigurationPath() ); DWfile.exists(...
  3. #2

    Default Re: DWfile and Image Files

    fletc4her wrote:
    > 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 : [url]http://CommunityMX.com/[/url]
    | Team Macromedia for Dreamweaver : [url]http://macromedia.com/go/team/[/url]
    danilocelic *TMM* Guest

  4. #3

    Default Re: DWfile and Image Files

    > 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]


    fletc4her Guest

  5. #4

    Default Re: DWfile and Image Files

    fletc4her wrote:
    >>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 : [url]http://CommunityMX.com/[/url]
    | Team Macromedia for Dreamweaver : [url]http://macromedia.com/go/team/[/url]
    danilocelic *TMM* Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139