Thank you so much! I have been trying to do this for ages without any success, now it works thank you!
@kaushikbhadani3 жыл бұрын
Thank you, Nitesh! Very nice explanation.
@sabinaghidossi6690 Жыл бұрын
Great tutorial! There is just something that I don't fully understand though, why you do the methods twice? One in the controller and one in the repository? Maybe I didn't understood the function of the repository. Can you kindly explain it to me? Thank you.
@deepro__ Жыл бұрын
Thank you very much, sir.
@chzakirislam17004 жыл бұрын
Awesome tutorial..... I am following your tutorial.... Plz keep uploading videos
@wongguanyan21414 жыл бұрын
Hi! I'm getting error on this Name = file.Filename, URL = await UploadImage(folder, file) It shows error code CS1061 and CS1503 on the (Filename) and (file) ! may I know how to fix this?
@RahulGupta-jk9lb3 жыл бұрын
Check the folder name spelling
@kamilxxx6876 Жыл бұрын
Is it neccesary to create that list in book? Can you just add images to table without it?
@Mamik227 Жыл бұрын
thank you!
@avijitroy51043 жыл бұрын
Sir, Thank you so much for your great tutorial. I am new in MVC. I have a Question. After choosing the image file, I want to show the image path in file upload control.
@mohamedkunle5283 жыл бұрын
if you want to see the chosen photo name you can use this jquery : @section Scripts { $(document).ready(function () { $('.custom-file-input').on("change", function () { var fileName = $(this).val().split("\\").pop(); $(this).next('.custom-file-label').html(fileName); }); }); }
@mazidulislamzahid60573 жыл бұрын
File is being copied but only last row inserted into database. Please provide solution. #region File Upload if (files != null) { Attachment oAttachment = new Attachment(); string CaseNo = oCaseInfo.ID; string newCaseFilePath = Directory.GetCurrentDirectory() + "\\wwwroot" + "\\uploads\\" + CaseNo; if (!Directory.Exists(newCaseFilePath)) Directory.CreateDirectory(newCaseFilePath); //directory create foreach (var file in files) { if (file.Length > 0) { //Getting FileName var fileName = Path.GetFileName(file.FileName); //Assigning Unique Filename (Guid) var myUniqueFileName = Convert.ToString(Guid.NewGuid()); //Getting file Extension var fileExtension = Path.GetExtension(fileName); // concatenating FileName + FileExtension var newFileName = String.Concat(myUniqueFileName, fileExtension); oAttachment.CaseID = oCaseInfo.ID; oAttachment.AttachmentName = fileName; oAttachment.ModifiedAttachmentName = myUniqueFileName + fileExtension; oAttachment.SetupDate = DateTime.Now; oAttachment.AttachmentPath = newCaseFilePath; // Combines two strings into a path. var filepath = newCaseFilePath + "\\" + newFileName; //var filepath = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "Images")).Root + $@"\{newFileName}"; using (FileStream fs = System.IO.File.Create(filepath)) { file.CopyTo(fs); fs.Flush(); } _db.Attachment.Add(oAttachment); } } } #endregion
@dattatreyakulkarni5414 жыл бұрын
I have one que please clear me , why you are assigning book parameter again in bookmodel as same , we can inherit know that class we can access know , what is the problem for inheriting please clear this ,i am going with all your dotnetcore videos
@WebGentle4 жыл бұрын
Yes, OfCourse you can inherit the class. My main focus is on dot net core mvc concepts. There are lots of things that you can use/improve in the codebase as per the need.
@dattatreyakulkarni5414 жыл бұрын
@@WebGentle Thank you for quick response but really I learnt much from your video thank you so much
@dattatreyakulkarni5414 жыл бұрын
Please upload some web api with microservices we are waiting
@ganesha16273 жыл бұрын
how to use jquery ajax in asp.net core. I am able to use in asp.Net framework but not in core
@victorcaceres35923 жыл бұрын
very good
@momosiafa173 жыл бұрын
How do I delete individual pictures within the gallery? I know how to delete the whole gallery image but I want to say delete one picture within the gallery? Thank you.
@MuhammadArslan-vx3rv3 жыл бұрын
Hy kindly send the link of edit and delete functionality of book details
@kumar_codes4 жыл бұрын
Can we use eager loading...while getting the images url
@vinaydeveloper13694 жыл бұрын
Very very helpfull video sir ..
@bl7937 Жыл бұрын
How to restrict file size and and file type?
@asharibkamal1 Жыл бұрын
upload image file name not shown how to do this
@StorySparkInspirations4 жыл бұрын
while displaying the image in carousal , I am getting NullRefrence exception
@WebGentle4 жыл бұрын
Kindly download the entire code from GitHub repo and match your code with it. You are missing some small things in your code.
@StorySparkInspirations4 жыл бұрын
@@WebGentle Issue shorted out but I want to display latest added image of my database in carousal.
@WebGentle4 жыл бұрын
@@StorySparkInspirations It depends on your LINQ (SQL) query. Whatever records you want to display, just fetch only those from the database and the logic of .cshtml (ie display logic) will be the same.