[thelist] Global.asa saving files

Christian Anderson chris at jobdragon.com
Mon Nov 17 01:31:37 CST 2003


Hi,
 
I'm still mucking with the global.asa file on my server, and now have the
problem that file attachments are not being saved to the server.
 
>From what I understand Functions are OK in global.asa, as long as they
aren't within a sub, so the following function should be ok:
 
------------
Function getAttachments()
  Set Attachments = msg.Attachments
   separator = ", "
 
  For i = 0 To Attachments.Count - 1
    If i = Attachments.Count - 1 Then
      separator = ""
    End If
 
  Set at = Attachments(i)
  at.SaveToFile( "c:\hshome\photokyo\blogzilla.jp\attachments\" & addedthing
& at.Name )
  getAttachments = getAttachments & "<a href=""/attachments/" &_
  at.Name &""">" & at.Name & "(" & at.Size & " bytes)" &_
  "</a>" & separator
  Next
End Function
-----------
 
What the whole script does is checks my email, and if there is a message
it'll make some entries in the DB, and then save the attachment to the
server.
 
This works if I run it in a regular .asp page, but for some reason the .asa
doesn't like it. Strange thing is I don't get any error message at all. It
just goes through the script and finishes with no complaints, writes the
filename of the attachment to the DB, but the file is not saved... cant
figure this one out.
 
Please help!
 
Christian


More information about the thelist mailing list