Closed SonamGadkari closed 5 years ago
What is your OS @SonamGadkari ??? Let me check again.
Windows
OK. I will fixed later for Windows.
Mean while, Could You try following repo: https://github.com/hendisantika/spring-boot-file-upload-ajax-rest https://github.com/hendisantika/springboot-upload-files-demo https://github.com/hendisantika/Kotlin-Spring-Boot-Upload-Download-Image https://github.com/hendisantika/spring-boot-upload-download-file-rest-api-example https://github.com/hendisantika/springboot-upload-files https://github.com/hendisantika/spring-boot-angular-fileupload https://github.com/hendisantika/File-Upload-Download-API https://github.com/hendisantika/springboot-upload-multiple-file-to-mysql
Change
private static String UPLOADED_FOLDER = "/tmp/";
with this
private static String UPLOADED_FOLDER = System.getProperty("java.io.tmpdir");
Thanks hendisantika. System.getProperty() worked for me. I am able to upload the image to temp folder. Any suggestions if I have to upload the image to project specific path \altarguild\src\resources\static\images\1.PNG
Check my other repository above @SonamGadkari. So, Can I say case closed???
Sure.Thanks
Hi hendisantika,
When I execute the project , I am facing an exception saying java.nio.file.NoSuchFileException: \tmp\WIN_20190920_10_41_45_Pro.jpg I have tried all the possible ways I could (for example changing the folder names) ,but I am ending up with the same exception every time. Any possible solution to this problem is really appreciated.
This is the same error even when I change the folder name to project specific path. java.io.FileNotFoundException: \src\resources\static\images\1.PNG (The system cannot find the path specified)
Thank you,