プロジェクトの相対パスにファイルをアップロードしたいと考えています。
webapp/fileUpload/ は、ファイルをアップロードするパスです。
だから私がパスを与えるとき
CommonsMultipartFile commonsFile = user.getImage();
String fileName = commonsFile.getOriginalFilename();
File destFile = new File("http://localhost:8080/SpringDemo/fileUpload/",fileName);
それは私に与えます
java.io.FileNotFoundException: http:\localhost:8080\SpringDemo\fileUpload\design.txt(The filename, directory name, or volume label syntax is incorrect)
何が正しい道なのか理解できません。
I want to save it under my project folder and not on any other path so I am using http:\localhost:8080\SpringDemo\fileUpload\as the path.
When i paste http://localhost:8080/SpringDemo/fileUpload/abc.txt into my browser it shows me the file.(abc.txt)
何が正しい道なのか理解できません。
これを行う正しい方法を教えてください。
前もって感謝します。
ジンゴ