\\\Tom Shelton
Private Function SerializeFontOb ject(ByVal fnt As Font) As String
Dim bf As New BinaryFormatter
Dim mem As New MemoryStream
Try
bf.Serialize(me m, fnt)
Return Convert.ToBase6 4String(mem.ToA rray())
Catch
Return String.Empty
Finally
mem.Close()
End Try
End Function
Private Function DeserializeFont Object(ByVal fnt As String) As Font
Dim bf As New BinaryFormatter
Dim mem As New MemoryStream(Co nvert.FromBase6 4String(fnt))
Try
Return DirectCast(bf.D eserialize(mem) , Font)
Finally
If Not mem Is Nothing Then
mem.Close()
End If
End Try
End Function
I know I can also use DIME attachments, so I don't need to convert the
data to Base64.
my question was not very exact .
I am looking in to way of sending big files (over 10MB). The way of
using DIME attachements is good for this, because i can split the files
to parts, not send them as one piece. I've used the for upload and it
works great.
The problem is that I can't figure out how to ask the web service for
the first part, then second and so on.
when uploading to web service i do a FOR loop and send chunks if data
to service, which concantenates them in file, but how to make the
service reads parts of the file and send them is unclear to me.
the reason i want to split the transfered files to parts is that it
will consume a lot of memory at the server if I read the whole file,
serialize it and then start sending it.
Comment