-
Notifications
You must be signed in to change notification settings - Fork 0
Home
jamesheck2019 edited this page Aug 30, 2019
·
8 revisions
Welcome to the FembedSDK wiki!
Download:https://github.com/jamesheck2019/FembedSDK/releases
NuGet:
- .NET 4.5.2
- Newtonsoft.Json
- DownloadFile
- DownloadFileAsStream
- GetDirectUrl
- ImportToYourAccount
- ListFolder
- ListRemoteUpload
- MultiRemoteUpload
- RemoteUpload
- RemoteUploadStatus
- SetVideoThumbnail_Local
- SetVideoThumbnail_Remote
- UploadLocalFile
- UserInfo
- YoutubeRemoteUpload
https://github.com/jamesheck2019/FembedSDK/blob/master/IClient.cs
set client
Dim Clnt As FembedSDK.IClient = New FembedSDK.FClient("xxxx", "xxxx")get user info:
Dim RSLT = Await Clnt.UserInfo()upload (local file)
Try
Dim frm As New DeQma.FileFolderDialogs.VistaOpenFileDialog With {.Multiselect = False, .Title = "Select image/s to upload"}
If frm.ShowDialog = DialogResult.OK AndAlso Not String.IsNullOrEmpty(frm.FileName) Then
Dim UploadCancellationToken As New Threading.CancellationTokenSource()
Dim prog_ReportCls As New Progress(Of FembedSDK.ReportStatus)(Sub(ReportClass As FembedSDK.ReportStatus)
Label1.Text = String.Format("{0}/{1}", ISisFunctions.Bytes_To_KbMbGb.SetBytes(ReportClass.BytesTransferred), ISisFunctions.Bytes_To_KbMbGb.SetBytes(ReportClass.TotalBytes))
ProgressBar1.Value = CInt(ReportClass.ProgressPercentage)
Label2.Text = If(CStr(ReportClass.TextStatus) Is Nothing, "Uploading...", CStr(ReportClass.TextStatus))
End Sub)
Dim RSLT = Await Clnt.UploadLocalFile(frm.FileName, FembedSDK.FClient.UploadTypes.FilePath, "", IO.Path.GetFileName(frm.FileName), prog_ReportCls, Nothing, UploadCancellationToken.Token)
DataGridView1.Rows.Add(RSLT.VideoUrl)
End If
Catch ex As FembedSDK.FembedException
MsgBox(ex.Message)
End Try