May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.
Dim uploadBytesSize As Integer = 200000 Dim sr As New IO.StreamReader("C:\A Large File.mp4") Dim fileLength As Long = sr.BaseStream.Length Dim bytesRemaining As Long = fileLength Dim bufferSize As Long Dim bytesUploaded As Long = 0 Do If bytesRemaining <= uploadBytesSize Then buffersize = bytesRemaining Else bufferSize = uploadBytesSize End If Dim buffer(bufferSize - 1) As Byte sr.BaseStream.Position = bytesUploaded sr.BaseStream.Read(buffer, 0, bufferSize) bytesUploaded += bufferSize uploadFile(buffer) Loop Until bytesRemaining < uploadBytesSize
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.