Skip to content

A Spring Boot project with file upload functionality to both local storage and a database.

Notifications You must be signed in to change notification settings

Eukolos/spring-file-upload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring File Upload

A Spring Boot project with file upload functionality to both local storage and a database.

Table of Contents

Technologies Used

Setup and Installation

To run this project, you will need to have Java 17.

Maven

1 ) Download your project from this link shown below

    git clone https://github.com/Eukolos/spring-file-upload.git

2 ) Go to the project's home directory shown below

    cd spring-file-upload

3 ) Create native image though this command shown below

    mvn spring-boot:run

Usage

Upload a Pdf to DB

POST /db-upload
Accept: multipart/form-data
Content-Type: multipart/form-data
{
example.pdf
}
RESPONSE: HTTP 200 (OK)
Response-Type: String
Location header: http://localhost:8080/db-upload

Upload a Pdf to Local

POST /local-upload
Accept: multipart/form-data
Content-Type: multipart/form-data
{
example.pdf
}
RESPONSE: HTTP 200 (OK)
Response-Type: String
Location header: http://localhost:8080/local-upload

Download a Pdf from Db

Get /db-download?name=example.pdf
RESPONSE: HTTP 200 (OK)
Response-Type: multipart/form-data
Location header: http://localhost:8080/db-download?name=example.pdf

Download a Pdf from Local

Get /local-download?name=example.pdf
RESPONSE: HTTP 200 (OK)
Response-Type: multipart/form-data
Location header: http://localhost:8080/local-download?name=example.pdf

Upload a Pdf to Db with Postman

db

Upload a Pdf to Local with Postman

db

Contributing

This project was created by Eukolos. Contributions are welcome!

About

A Spring Boot project with file upload functionality to both local storage and a database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages