Hi.
How can I upload a file to my Dropbox public folder (https)?
I can download perfectly with Inet and this function:
But now I need to UPload.
How can I upload a file to my Dropbox public folder (https)?
I can download perfectly with Inet and this function:
Code:
Public Sub DownloadFile(strURL As String, strDestination As String)
Const CHUNK_SIZE As Long = 1024
Dim intFile As Integer
Dim lngBytesReceived As Long
Dim lngFileLength As Long
Dim strHeader As String
Dim b() As Byte
DoEvents
With Inet2
.URL = strURL
.Execute , "GET", , "Range: bytes=" & CStr(lngBytesReceived) & "-" & vbCrLf
While .StillExecuting
DoEvents
Wend
strHeader = .GetHeader
End With
strHeader = Inet2.GetHeader("Content-Length")
lngFileLength = Val(strHeader)
DoEvents
lngBytesReceived = 0
intFile = FreeFile()
Open strDestination For Binary Access Write As #intFile
Do
b = Inet2.GetChunk(CHUNK_SIZE, icByteArray)
Put #intFile, , b
lngBytesReceived = lngBytesReceived + UBound(b, 1) + 1
Loop While UBound(b, 1) > 0
Close #intFile
End Sub