Repository navigation
Step6 - #145
Merged
Merged
Step6#145
Conversation
javajigi
suggested changes
Jan 21, 2019
| @Entity | ||
| public class Multipart extends AbstractEntity { | ||
| private static final Logger log = getLogger(Multipart.class); | ||
| private static final String UPLOAD_PATH = "C:\\Users\\User\\Documents\\workspace\\codesquad\\java-ims\\src\\main\\resources\\static\\fileUpload\\"; |
Contributor
There was a problem hiding this comment.
이와 같은 설정 정보를 하드코딩할 경우 서버에 배포했을 때 정상적으로 동작할까?
https://www.baeldung.com/spring-value-annotation 문서 참고해 설정 정보를 properties에서 관리한다.
파일 업로드 경로를 프로젝트 내 경로(src/main/resources/static과 같이)로 하지 말고 외부 경로로 설정한다.
javajigi
suggested changes
Jan 21, 2019
javajigi
left a comment
Contributor
There was a problem hiding this comment.
수정한 후 테스트 정상적으로 진행했나요?
코드 수정하면 테스트 철저하게 진행해 주세요.
| private String saveName; | ||
|
|
||
| @Value("${value.from.file}") | ||
| private String uploadPath; |
Contributor
There was a problem hiding this comment.
이 설정이 정상적으로 동작하나?
의도한데로 동작하는지 값을 출력해 본다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
이슈에 글을 올렸을 때, 파일을 업로드 및, 다운로드를 할 수 있게끔 만들었습니다.
이번 작업을 하면서, 파일 업로드에 대해서 조금 이해하게 되었고, 많은 착오가 있었지만 많은 어려움 없이 해결이 되어 조금은 의아 합니다.
다운로드를 outputstream을 사용하여 해보려 노력했지만, 아직 부족한 관계로 다음 기회에 다시 도전해 보려합니다.
이번에 파일 업로드를 하면서 구글에서 많은 정보들을 찾았었는데, 파일 업로드, 다운로드 한 것도 뿌듯 하지만, 정보를 혼자서 찾아 만들었다는 것에 더욱 값진 기간이였던 것 같습니다.