Upload file save location problem analysis 1--

上传文件在服务器端保存位置问题
	
	1.保存在可以被浏览器直接访问的位置
		例如:商城的商品图片
		
		保存在工程的WebRoot下的路径(不包含META-INF以及WEB-INF目录及其子目录)
		
	2.保存在不能被浏览器直接访问的位置
		例如:付费的视频。		
			
		1.工程中   META-INF  WEB-INF目录及其子目录
		2.不在工程中的服务器的磁盘目录下.
  • After uploading a file, save the location on the server side

The first storage location: WebRoot placed directly under the other directory and subdirectory of the WEB-INF other, for example, META-INF: WebRoot / upload

* The client can access the browser via url location (data without going through access control, and can directly access) require the user to upload directly ---- resource security less demanding, or resources directly visible

* For example: Shopping Mall Picture

 

The second category storage location: WEB-INF placed or not and its sub-directory management server tomcat example: WebRoot / WEB-INF / upload, c: \, d: \ abc

* Clients can not be directly accessed through the URL, the server must be able to read by the internal program (high security, you can easily add access control)

* For example: membership online video

Released 2417 original articles · won praise 62 · Views 200,000 +

Guess you like

Origin blog.csdn.net/Leon_Jinhai_Sun/article/details/105156439