spring-guides / gs-uploading-files

Uploading Files :: Learn how to build a Spring application that accepts multi-part file uploads.

Home Page:http://spring.io/guides/gs/uploading-files/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FILES DELETED ON MAC OS 10.13.2!!!!!

chenjiangtao opened this issue · comments

When I run this program ,I updated the location to my home folder,like this
private String location = "/Users/home/jiangtao" ,
then I open the url http://localhost:8080/ , see a lot of files and folders..... I click some one type is folder to download......the horrible things coming,all my files and folders in the director /Users/home/jiangtao start deleting .......

the chrome download path is /Users/home/jiangtao/Downloads

evn:

Mac OS 10.13.2
Java 8
IntelliJ IDEA, Chrome

  • update the location
  • the load method
  • my mac system file deleted
  • just few seconds my computer deleted more than 100G

Well that sounds very unfortunate, but I guess this is exactly how the application is supposed to work.

Take a look at


This line says that on startup of the application the content of the upload-dir is deleted recursively. And this is exactly was happened in your case.

Maybe there should be a warning somwhere that the upload-dir is deleted on startup.

Oooh, my god ,you're right.....Thank you very much @bennypi
run the example must be careful....