The file is only 14kb (14,000 bytes). I have read that the varbinary(max)
column type (which is what I am using) only supports 8,000 bytes. Is that correct? How can I upload my file into the database?
if (file.ContentLength < (3 * 1048576))
{
// extract only the fielname
var fileName = Path.GetFileName(file.FileName);
using (MemoryStream ms = new MemoryStream())
{
file.InputStream.CopyTo(ms);
byte[] array = ms.GetBuffer();
adj.resumeFile = array;
adj.resumeFileContentType = file.ContentType;
}
}
The error:
String or binary data would be truncated. The statement has been terminated.