About using kkFileView - online file preview, preview error

About using kkFileView - online file preview, preview error

Scenario recurrence:

  1. Upload files directly at the test address + preview (no problem)
  2. Put it in a specific folder and preview it online (no problem)
  3. 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("\\","/")

Supongo que te gusta

Origin blog.csdn.net/weixin_42947972/article/details/131373194
Recomendado
Clasificación