Hi first of all thanks for the content 😃 have a small question at 7:50 why are we using @ManyToMany, my doubt is one product can have many images so it has be @OneToMany right? those images are only associated with this product right. If we are using @manyToMany those images can be associated to other products also right. I have this confusion can you please explain.
Many thanks for the explanation, I have a question, How can I test my RestAPI in a mock tool and upload the images ? (for example Postman) , the thing is that I haven't created the frontEnd like Angular or React yet. So I don't have a visual forms tool.
Please help I get this error when I upload image and press add product button Resolved [org.springframework.web.multipart.support.MissingServletRequestPartException: Required request part 'imageFile' is not present]
Bro this is Anush. I need to know how to connect this spring boot API with angular so that when a user uploads an image it get saved into sql/mysql database
Hello Sir, I got this error when I uploaded image Resolved [org.springframework.web.multipart.support.MissingServletRequestPartException: Required request part 'imageFile' is not present. So I do I test this in postman or swager. I uploaded image in image field, but it not working... Can you show how to test it using postman in a short video for us who are beginers? Thanks in advanced.
@@LearnProgrammingYourself Good day hope this finds you well. Please help testing this on post man. I n my case, I have a course with just cover image so i didn't make the separate table for that since its just one image instead added just a column. So when I test with post man using form-data it get error Required part 'course' is not present.]
Excellent explanation , i want to ask you why you don't save image in file in the server not in database , becouse if alot of picture or file save in database it make it slowly . thank you
Yes in the future we can think on that. My current focus is on getting the things to work. But once we get the basic working application then we can think on enhancements
Hi first of all thanks for the content 😃
have a small question at 7:50 why are we using @ManyToMany, my doubt is one product can have many images so it has be @OneToMany right? those images are only associated with this product right. If we are using @manyToMany those images can be associated to other products also right. I have this confusion can you please explain.
Yes right @OneToMany is the best choice here. thanks for the suggestion
Many thanks for the explanation, I have a question, How can I test my RestAPI in a mock tool and upload the images ? (for example Postman) , the thing is that I haven't created the frontEnd like Angular or React yet. So I don't have a visual forms tool.
need to check, I was getting issues while checking from postman. so I directly tested from angular UI
Hii bro need help , did i need to create all Dao,Controller and service layers for imagemodule
Please help I get this error when I upload image and press add product button
Resolved [org.springframework.web.multipart.support.MissingServletRequestPartException: Required request part 'imageFile' is not present]
imageFile is a mandatory parameter use the API. Please make sure you are sending it.
@@LearnProgrammingYourself how do I do that, can u explain
You can checkout my image upload video. In that I have explained step by step.
API for posting Data and image at a same time it's not working I checked in postman showing error: Unsupported Media Type
@@rohitprajapati1113 Estou com mesmo problema!
Does this playlist cover the whole project backend + frontend?
Yes it covers everything including security
@@LearnProgrammingYourself thx bro :-)
Best videos..🙏..keep doing videos...these are useful for us..✌ Thanks varadraj..
Thanks a lot Ashish
Bro this is Anush. I need to know how to connect this spring boot API with angular so that when a user uploads an image it get saved into sql/mysql database
Yes you will see video on this in one day
@@LearnProgrammingYourself Thanks bro hope I will get it soon
@@LearnProgrammingYourself I am eagerly waiting for this video bro 🧐
Hello Sir, I got this error when I uploaded image
Resolved [org.springframework.web.multipart.support.MissingServletRequestPartException: Required request part 'imageFile' is not present. So I do I test this in postman or swager. I uploaded image in image field, but it not working... Can you show how to test it using postman in a short video for us who are beginers? Thanks in advanced.
Yes will do this😊
@@LearnProgrammingYourself Good day hope this finds you well. Please help testing this on post man. I n my case, I have a course with just cover image so i didn't make the separate table for that since its just one image instead added just a column. So when I test with post man using form-data it get error Required part 'course' is not present.]
@@LearnProgrammingYourself
Below is my code snippet
@PostMapping(consumes = {MediaType.MULTIPART_FORM_DATA_VALUE})
public Course SaveCourse(@RequestPart("course") Course course, @RequestPart("image")MultipartFile file) throws IOException {
//upload images
String imageName = file.getOriginalFilename();
String contentType = file.getContentType();
byte[] ImageByte = file.getBytes();
try {
file.transferTo(new File("images/" + imageName));
} catch (IOException e) {
System.out.println(e.getMessage());
throw e;
}
course.setImage(ImageByte);
course.setCover_image(imageName);
return courseService.saveCourse(course);
}
Excellent explanation ,
i want to ask you why you don't save image in file in the server not in database , becouse if alot of picture or file save in database it make it slowly .
thank you
Yes in the future we can think on that. My current focus is on getting the things to work. But once we get the basic working application then we can think on enhancements
do you mind if I ask, if you have repo for this project? if yes, do you mind if I see it?
yes. please check last session of this playlist
wonderful
Thanks a lot
hey nice video, can you show also the productService code or at least the addNewProduct? Also your repo, thank you very much!
Please check last session in this playlist for source code.
how to test this using postman
Honestly from postman I was getting some to test this.
👌... Can you make a video on joining collections in mongodb with spring boot and also uploading documents using API
Yes I will surely make video on it. Thanks a lot
Hello I got error 401 authentication
How to solve this error
Just check you web security configuration at back end
Please provide the source code
Yes will provide it.
Please help me
i get 415 error
What is the error message?
@@LearnProgrammingYourself when testing in postman i got 415 not supported error