Hi, I can this code, but I can't save the archive in the blob camp into my
MySQL Database... ¿why? can you help me? I work with c# and MySQL in a
ASP.NET application... Now, Theoretically in the field byteData estan the
information of the file. This information I them sending to save to the
database them passing for a reference, but it does not do it. what can
happen?
public void btnUpload_Click(object sender, System.EventArgs e)
{
// If no file was uploaded then you probably want to inform the user to
select a file
// before clicking the upload button.
if (filUpload.PostedFile != null)
{
// Get a reference to the uploaded file
HttpPostedFile filPosted = filUpload.PostedFile;
int intFileLength = System.Convert.ToInt32(filPosted.ContentLength);
// Ensure that there were contents to the file. Exit out of the function if
there is no content.
if (intFileLength == 0)
{
return;
}
byte[] byteData = new byte[intFileLength];
filPosted.InputStream.Read(byteData, 0, intFileLength);
}
}