I want to upload pictures in my source project. It works when I address desktop but I don't know How to address In my source

for(FileItem item : items){                        
  File upDir = new File("/SliderManagment2/uppic");
  File file = File.createTempFile("img", ".png" , upDir);
  item.write(file);            
}

1 Answers

0
abj1305 On

According to documentation:

For Microsoft Windows platforms, the prefix of a pathname that contains a drive specifier consists of the drive letter followed by ":" and possibly followed by "\" if the pathname is absolute. The prefix of a UNC pathname is "\\"; the hostname and the share name are the first two names in the name sequence. A relative pathname that does not specify a drive has no prefix.