본문 바로가기

데일리

톰캣 서버 구동시킨상태에서 이미지 업로드 구현

 

케이스1)

C:\MULT_IT_EDU_20\utils\apache-tomcat-9.0.85\webapps\ROOT

사진폴더 를 넣는다 폴더명:uploadimg 

 

C:\MULT_IT_EDU_20\utils\apache-tomcat-9.0.85\bin 에서 startup.bat 클릭

 

톰캣 localhost:8090/uploadimg/default.png

 

th_selectAll.html 에서 사진url 변경: <img th:src="\http://localhost://8090/uploadim/thumb_${vo.save_name}\

 

 

저장경로변경: application.properties 

file.dir=실제경로(정적경로) 말고 톰캣서버경로(동적경로)로 변경->

C:\\MULT_IT_EDU_20\\utils\\apache-tomcat-9.0.85\\webapps\\ROOT\\uploadimg

{{역슬러시추가}}