[REBOL] Re: File writing issue
From: mattsmac:ho:tmail at: 31-Oct-2003 8:57
That makes sense, but how do I email an attachment that is in memory.
Basically this is the scenario:
The client software sends a file to the server, this needs to be done using
read and write commands because FTP is not secure enough. Then once the
file gets to the server, the server sends out an email which includes the
file. So as far as I can see, the file needs to come from disk and not from
memory. I have tried doing a read/binary of the file into a string in
memory and manually formatting the message body, but it never comes out as
the attachment in the email, its just always a text file that has all the
binary in it.
Matt
------------------------------------
I suspect the problem is either in your
/direct mode handling, or the build attach
code.
What happens when you do not use /direct mode?
If you write in buffered mode, you have the file
contents in memory, so you should be able to
write/binary the file, then send straight from memory.
Also you can read/binary and compare the contents
in memory.
contents: read/binary file
write/binary file2 contents
contents2: read/binary file2
; compare contents
print (checksum contents) = checksum contents2
I know you want to use /direct mode, but until you
are bug free... divide and conquer.
Anton.