본문 바로가기

전체 글7

파일 업로드 시 413 payload too large 에러 어제부터 바보짓을 해서 났던 에러를 공유하고자 이 글을 쓴다.. 아무도이런 바보짓을 하지는 않을 것 같지만 ㅎㅎ vue3 + springboot 로 개발을 하고 있는데 백에는 아무것도 찍히지 않고 프론트 콘솔에서 413 payload too large 에러가 나왔다. 파일을 1kb 짜리를 올리고 있는데 too large라고?! 백에 아무것도 안찍혀서 당연히 프론트에서 내가 뭔가 잘못한 줄 알고 이것저것 고치고,, node 다시 깔고 캐시 지워보고 다 했는데도 안됐는데 당연했다... yml 파일에 이상한짓함 ㅎㅎㅎ servlet: multipart: enabled: true max-file-size: 1 max-request-size: 1 location: C:\\file max-file-size와 max.. 2024. 3. 21.
[vue3+TypeScript] FileList 배열로 바꾸기 const files = ref(null) console.log('event.target.files ::: ', event.target.files) files.value = event.target?.files console.log('files ::: ', files) 로 파일 업로드를 하고 이것을 event.target.files 로 찍어보면 아래처럼 나온다. (타입 에러때문에 유튜브를 뒤지다가 const files = ref(null) 이렇게 하신 분을 봐서 에러가 안나는 것까지는 확인했는데 아직 왜 저렇게 해야만 에러가 안나는지 이해는 못하는중.. 아시는 분 있으시면 댓글 부탁드려요 ㅠ^ㅠ) 저 FileList는 index가 있어서 배열처럼 보이지만 사실은 유사배열객체이다. 일반 객체는 length가.. 2024. 3. 12.
Unable to locate the default servlet for serving static content. Please set the 'defaultServletName' property explicitly. 프로젝트 실행 시 에러 발생 Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2022-04-15 10:58:05 [main] ERROR o.s.boot.SpringApplication @reportFailure:830 - Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultServletHandlerMapping' defined in class path resource [org/springfram.. 2022. 4. 15.
[WARNING] The requested profile "pom.xml" could not be activated because it does not exist. console창에 WARNING 발생 [WARNING] The requested profile "pom.xml" could not be activated because it does not exist. 프로젝트 우클릭 - Properties pom.xml 을 지우면 된다. 2022. 4. 15.