About using kkFileView - online file preview, preview error
Scenario recurrence:
- Upload files directly at the test address + preview (no problem)
- Put it in a specific folder and preview it online (no problem)
- Upload the file at the front end, and then get the address to preview (there is a problem)
Reason:
Through searching, it is found that it is the problem of the oblique rod! ! ! Because we are developing under the window (if it is under Linux, there should be no problem), the obtained path is probably like this D:/file/kcpj/resource\39f3d950-fabd-4d93-a60c-11f66fb75c78.txt
Java usage: File.separator is nothing wrong
solve:
- Just replace the path at the front end
.replace("\\","/")