Giter Club home page Giter Club logo

simplebox's Introduction

SimpleBox

파일 저장 및 공유 웹사이트

Spring 프레임워크 및 JPA를 이용한 파일 저장 및 공유 웹사이트

메인 화면


개발 목표

Spring 프레임 워크& JPA를 사용하여 CRUD 기능 및 파일 업로드 구현을 위한 웹 페이지


사용 기술

  • JAVA
  • Spring 프레임워크
  • JPA
  • React 프레임워크

Advanced Feature

##드래그 앤 드롭을 지원하는 다중 파일 업로드

  • 화면

drag drop2

drag&drop

  • 코드
@PostMapping("/pandora")
public String savePandora(@RequestParam("files") List<MultipartFile> files,
                          @RequestParam("name") String name,
                          @RequestParam("count") String count,
                          @RequestParam("code") String code) throws IOException {

    String ret="";
    int iCount=Integer.parseInt(count);
    List<String> fileNames=new ArrayList<>();
    
    
    try{
        for (MultipartFile file : files) {
            //DB에 메타데이터를 저장하기 위해 file의 원래 이름을 리스트에 넣어줌
            fileNames.add(file.getOriginalFilename());
            
            //실제 저장소에 파일 저장
            saveFile(file,directoryPath);
        }

        //DB에 Pandora 및 file의 메타데이터 저장
        Long savedPandoraId = pandoraService.makePandora(name,code, iCount, directoryPath, fileNames);
        Pandora newPandora = pandoraService.findOne(savedPandoraId);
        ret=newPandora.getKey();
    }
    catch (IOException e){
        System.err.println("IOException occurred!");
    }
    return ret;
}

simplebox's People

Contributors

rlagudtn avatar antaewook avatar

Watchers

 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.