E
eruig
Guest
Private Async Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
Try
ToolStripStatusLabel1.Text = "Uploading"
Await Task.Delay(txtDelay.Text)
Dim AZBlob As New AzureBlob(ConfigurationManager.AppSettings(StorageConnectionString), mycontainer)
Await AZBlob.UploadAsync(PictureBox1.ImageLocation, cancelToken)
'---Insert in SQL Table using PictureBox1.ImageLocation
my table has the columns:
Id
FileUrl
FileData
OriginalName
ContentType
DateCreated
ToolStripStatusLabel1.Text = ""
PictureBox1.Image = Nothing
Catch exCancel As OperationCanceledException
Dim message As String = "upload canceled at Form"
MessageBox.Show(message)
ToolStripStatusLabel1.Text = message
Catch ex As Exception
MessageBox.Show(ex.Message)
ToolStripStatusLabel1.Text = ex.Message
End Try
End Sub
Continue reading...
Try
ToolStripStatusLabel1.Text = "Uploading"
Await Task.Delay(txtDelay.Text)
Dim AZBlob As New AzureBlob(ConfigurationManager.AppSettings(StorageConnectionString), mycontainer)
Await AZBlob.UploadAsync(PictureBox1.ImageLocation, cancelToken)
'---Insert in SQL Table using PictureBox1.ImageLocation
my table has the columns:
Id
FileUrl
FileData
OriginalName
ContentType
DateCreated
ToolStripStatusLabel1.Text = ""
PictureBox1.Image = Nothing
Catch exCancel As OperationCanceledException
Dim message As String = "upload canceled at Form"
MessageBox.Show(message)
ToolStripStatusLabel1.Text = message
Catch ex As Exception
MessageBox.Show(ex.Message)
ToolStripStatusLabel1.Text = ex.Message
End Try
End Sub
Continue reading...