File Upload Articles
2 articles about File Upload. Explore Spring Boot implementation, design, and operations across related topics.
-
How to Test File Upload APIs Using MockMvc in Spring Boot - Testing Error Cases for Size Limits and MIME Validation with MockMultipartFile
Learn how to use MockMultipartFile and perform(multipart()) to test file upload APIs, covering not only normal-case testing but also how to write error-case tests that verify a 400 response is returned when the size limit is exceeded or an invalid MIME type is used.
-
How to Upload and Download Files to AWS S3 with Spring Boot - AWS SDK v2 and Presigned URL Support
This article explains how to implement file upload and download from a Spring Boot application to AWS S3 using AWS SDK v2. It covers how to choose between the SDK and spring-cloud-aws 3.x, a Service implementation that handles MultipartFile, presigned URL generation, IAM role authentication, and an example least-privilege policy, all with copy-and-paste-ready sample code.