معادل InputStream.Read در mvc.core چیست
iran iran
11 شهريور ۱۴۰۱
معادل کد زیر در mvc.core چیست
items.InputStream.Read(Attach.Attached, 0, items.ContentLength);foreach (var items in file)
{
var Attach = new Add
{
DocumentationAttachId = Guid.NewGuid(),
DocumentationId = newGuId,
FileName = items.FileName,
ContentType = items.ContentType,
FileLength = items.ContentLength,
Attached = new byte[items.ContentLength],
};
items.InputStream.Read(Attach.Attached, 0, items.ContentLength);
db.AttachRepository.Add(AttachMapper.Attach(Attach ));
db.Complete();
}
318
1 پاسخ
- محمد اشرافی14 شهريور ۱۴۰۱
سلام می تونید از ReadStream استفاده کنید و دیگه نیازی به InputStream.Read نیست
