Spring Boot File Upload and Download REST API Examples

preview_player
Показать описание
In this video, I'd love to share with you how to develop REST APIs for file upload and download with Spring Boot. With the uploaded files are stored on disk; and random codes are used to identify files in download API.

Technologies:
- Spring Boot with Spring Web MVC, Spring RESTful Web Services
- Maven build

Software programs:
- Java Development Kit (OpenJDK / Oracle JDK)
- Spring Tool Suite IDE (STS)
- Postman for testing REST APIs

Рекомендации по теме
Комментарии
Автор

Thank you, very informative video. This helped lots with my internship assignment.

riyarohanz
Автор

your REST API in Spring Boot videos are great

ramosespann
Автор

Building api server with spring is the best, now let's build UI with modern frontend framework 😁🦊

ktn
Автор

Best video for Upload&Download File REST API! THANKS!!!

javadeveloper
Автор

Video rất bổ ích ạ, mong anh làm 1 video về roadmap của Spring Boot ạ

ChinhNguyen-egkm
Автор

@20:00 I think the use of a UUID4 would have been better here. No need for Commons (though I love Commons), just use Java.

timothystone
Автор

On File Upload the HTTP response should be 201 Created with a Location header to the new resource.
200 OK (or Found) @13:31 is arguably not semantic.

timothystone
Автор

It's great 👍
Can you make login and registration api with spring security

taregbalola
Автор

thưa thầy sửa lỗi này thế nào ạ?" The Unicode character [ư] at code point [432] cannot be encoded as it is outside the permitted range of 0 to 255"

manit
Автор

Sir please make video on how to use jwt token in spring security, how to login with jwt and logout .

ajitkumarneeraj
Автор

What about pdf upload inspite of image

naveen
Автор

Hi anh, em có thắc mắc muốn hỏi là trong trường hợp download.Thay vì trả về đối tượng Resource như video thì có trả về 1 mảng byte thì kết quả cũng tương tự.
Anh cho em hỏi là có sự khác nhau của việc dùng Resource và mảng byte đối với chức năng download ko ạ ?
Và em muốn hỏi thêm anh là best practice khi download file (tải được file nặng không bị tràn bộ nhớ) là gì ạ?
Cảm ơn anh !

xuaniennguyen
Автор

We could've used UUID right? Does RandomString method always return unique strings?

Manikandan-nnbw
Автор

Hello Sir !!
How we can insert DATA and IMAGE both together into Database in ONE ROW of database using spring boot:
Like:-

private int id,
private String firstName,
private String lastName,
private String email,
private long mobileNumber,
private String email,
private byte [ ] image,

please help me!!

rajnikant
Автор

I need to create career portal where userdetails along with resume upload is there.. They asked me to do like save the file in directory and filename in db with same entity class... . Can I do like this?

abishasherlin
Автор

Where these files upload when its deployed? If you deploy it as jar or war

pepepriest
Автор

Hi, Can you also share the headers as i am getting this error The server does not support the request payload’s media type

vishruthreddy
Автор

Hello, i'm getting an error in the upload " required request part file is not present, all my code is similar as yours and postman also

marouenghozzi
Автор

i added the annotatin @document to the entity but still not saving the data in my db, I use mongo db compass any solution

eyamejri
Автор

Im getting
"errorMessage": "Exception : 400 BAD_REQUEST \"Required MultipartFile parameter 'file' is not present\""
any help will be appricated

chandrasekar