سلام
این خط کد مشکلش چیه؟!
فقط یک تصویر از تصاویرم رو ذخیره میکنه!
try { string path = Server.MapPath("~/Image/"); HttpFileCollectionBase MyFileCollection = Request.Files; HttpPostedFileBase MyFile; int i ; int j = MyFileCollection.Count; int FileLen; Stream MyStream; for(i = 0; i < j; i++) { MyFile = MyFileCollection[i]; FileLen = MyFile.ContentLength; byte[] input = new byte[FileLen]; MyStream = MyFile.InputStream; MyStream.Read(input, 0, FileLen); for (int Loop = 0; Loop < FileLen; Loop++) { MyString = path + input[Loop].ToString(); } MyFileCollection[i].SaveAs(MyString + ".jpg"); }
سلام خدمت شما
متغیر myFile شما به صورت single هستش و در هر صورت تعداد آیتم ها یکی در نظر گرفته میشه
هیچ کاربری تا کنون از این پست تشکر نکرده است
با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)