Giter Site home page Giter Site logo

trytop / tus-java-server-spring-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tomdesair/tus-java-server-spring-demo

0.0 0.0 0.0 20 KB

Tus Java server demo with asynchronous and resumable file uploads in Spring Boot

License: MIT License

HTML 4.22% JavaScript 20.61% Java 75.17%

tus-java-server-spring-demo's Introduction

tus-java-server-spring-demo

Tus java server demo using Spring Boot that uses the tus-java-server library and the Uppy file uploader in order to easily provide asynchronous and resumable file uploads in Spring.

To build and run this demo, execute the following commands:

$ git clone https://github.com/tomdesair/tus-java-server-spring-demo.git
$ cd tus-java-server-spring-demo
$ mvn clean package
$ java -jar spring-boot-rest/target/spring-boot-rest-0.0.1-SNAPSHOT.jar

Then visit http://localhost:8080/test/ in your browser and try to upload a file using the Uppy file uploader.

Que?

  • Module spring-boot-rest provides the API backend for receiving tus file uploads:

    1. Method me.desair.spring.tus.App#tusFileUploadService create a TusFileUploadService Spring bean based on the Spring Boot configuration that can be auto-wired into other beans.
    2. The me.desair.spring.tus.FileUploadController provides the /api/upload endpoint and passes all request directly to that TusFileUploadService bean.
    3. Class me.desair.spring.tus.client.UploadScript is a script to upload a file using the tus-java-client library and can be ignored.
    4. File src/main/resources/public/index.html contains the actual home page and loads the Uppy JavaScript file generated by the uppy-file-upload module.
  • Module uppy-file-upload contains the Webpack and Uppy configuration to fetch and join all required JavaScript files. This is not a production ready setup!

    1. File uppy-file-upload/app/uppy-fileupload.js contains the configuration parameters of the Uppy tus JS client.

tus-java-server-spring-demo's People

Contributors

tomdesair avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.