Giter Club home page Giter Club logo

zip_viewer_test's Introduction

zip_viewer_test

Make zip_viewer prototypes

zip_viewer_test's People

Contributors

jjk376 avatar sjbaek0312 avatar

Stargazers

Lee Juwon avatar  avatar

Watchers

Lee Juwon avatar  avatar JaeYong avatar  avatar

Forkers

sjbaek0312

zip_viewer_test's Issues

[일일보고] 개발2랩 백승진 7월 6일 

[7월 6일]

오늘 할 일 :

1. 과제 분석
2. 스프링 프레임워크 스터디(연습 프로젝트 진행)
3. 프로젝트 프로토타입 제작(계속)
4. gitHub 사용해보기
5. 프로젝트 세부 요구사항 정리

오늘 한 일 :

1. 프로젝트 세부 요구 사항에 대한 의견 교환, 정리
2. 스터디(스프링)
3. 14시 미팅 : 
	1) 보고서는 github issue에 올리고 이메일로 또 보낸다.(참조에 전병수/이주원 추가 해서 보내주세요.)
	2) 기능의 핵심은 upload / view
	3) 사용자의 환경은 PCWeb이라고 전제 한다.
	4) 추가로 개발하면 좋은 사항
	- 우클릭 기능 추가
	- 회원 관리 기능을 추가시 보안이 아주 중요하다.
	5) 보고서에 prototpye 저장소 위치 : sjbaek0312/zip_viewer_test 또는 jjk376/zip_viewer_test 
4. 스프링을 사용한 파일 업로드 테스트(미완성)

내일 할 일 :

1. 스프링을 사용한 파일 업로드 테스트(계속)
2. 스터디(스프링)
3. 1을 완성했을 경우 파일 경로 또는 탐색기 출력

느낀 점 : 프로젝트에 대한 조금 더 세부적인 내용을 팀원인 재경님과 함께 보며 정리하였다.
일정 부분 정리를 하고 나니 해야 할 것들이 조금씩 눈에 보이기 시작했다.
오늘은 스프링에서 서버 파일 업로드를 해보려고 했지만 실패했다.
uploadController의 메서드인 uploadForm이 서버가 실행되자마자 한 번 실행되는 것 같다.
uploadForm 메서드에 파일의 이름을 가져오는 코드가 있는데 파일 업로드 버튼을 누르기도 전에 자동으로 실행되어서 NullPointerException 에러가 나는 것 같다.

@controller
public class UploadController {

private static final Logger logger = 
		LoggerFactory.getLogger(UploadController.class);
@Resource(name = "uploadPath")
private String uploadPath;

@RequestMapping(value = "/uploadForm")
public void uploadForm(MultipartFile file, Model model) throws Exception
{
	logger.info("test...");
//	logger.info("original file name : " + file.getOriginalFilename());
//	logger.info("file size : " + file.getSize());
//	logger.info("content type : " + file.getContentType());
//	String newName = uploadFile(file.getOriginalFilename(), file.getBytes());
//	model.addAttribute("newName", newName);
//	주석 제거시 위의 문제 발생
}

private String uploadFile(String originalName, byte[] fileData) throws Exception
{
	UUID uid = UUID.randomUUID();
	String newName = uid.toString() + "_" + originalName;
	File target = new File(uploadPath, newName);
	FileCopyUtils.copy(fileData, target);
	return newName;
}

}

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.