Skip to content

xRegner/api-upload-files-spring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

api-upload-files-spring

This project allow you to upload files in a persistent volume (file folder) 📝 by a REST API

Getting Started

To use this project you could use the Dockerfile to build a local image or clone and run locally

Prerequisites

  • Java 1.8 +
  • maven
  • Docker

Once you have cloned this project:

cd thc-upload-files-java
mvn clean package 
mvn spring-boot:run

Installing with docker

cp Dockerfle target/
cd target 
docker build -t thc-upload-images-local .
docker run -ti -d  -p 8080:8080 --restart=always -v $(pwd)/upload:/upload-dir/ --name local-files-thc thc-upload-images-local

Now you will be able to use postman to call:

until finished

Installing with maven local

mvn spring-boot:run

Now you will be able to use postman to call:

Configurations

To change limits you ccould edit application.properties

  • spring.servlet.multipart.max-file-size=1028KB -> Limits to store
  • spring.servlet.multipart.max-request-size=1028KB -> Limits to rq

Built With

  • Maven - Dependency Management

Contributing

TBD

Versioning

TBD

Authors

  • **Christian Regner 👺 ** - Initial work - xtian

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc

About

This project store files in upload-dir

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published