I'm trying to update the content of document using resumableuploader, but alway get 411 error, what i'm wrong in following code?
Dim info As New IO.FileInfo(file)
Dim tExt As String = info.Extension.ToUpper().Substring(1)
Dim contentType As String = CType(DocumentsService.DocumentTypes(tExt), String)
Dim stream As IO.FileStream = info.Open(IO.FileMode.Open, IO.FileAccess.Read, IO.FileShare.ReadWrite)
' Chunk size in MB
Dim CHUNK_SIZE As Integer = 1
Dim cla As New ClientLoginAuthenticator("bla", ServiceNames.Documents, "<user>", "<pass>")
'Set up resumable uploader and notification
Dim ru As New ResumableUploader(CHUNK_SIZE)
AddHandler ru.AsyncOperationCompleted, AddressOf ru_AsyncOperationCompleted
AddHandler ru.AsyncOperationProgress, AddressOf ru_AsyncOperationProgress ' ru_AsyncOperationProgress(ru, AsyncOperationProgressEventArgs)
' Add the upload uri to document entry
Dim Uri1 As New Uri(pDocEntry.AtomEntry.Content.AbsoluteUri)
ru.UpdateAsync(cla, Uri1, stream, contentType, New Object())