search

Home  >  Q&A  >  body text

java 数据库里面有存放路径,怎么去下载这个路径的内容?

天蓬老师天蓬老师2802 days ago633

reply all(2)I'll reply

  • 巴扎黑

    巴扎黑2017-04-18 10:48:56

    IO streams. . . .

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-18 10:48:56

    This method is not recommended, but there are solutions:
    1. Develop an interface, and the interface parameters can uniquely identify 'the path stored in the database'
    2. Use the IO stream in the interface, get the path according to the database, and read the IO Return to the client
    I think the normal solution is:
    1. Create a new directory locally to store your files and save the relative path. For example, if you create this level directory src, it will be doc/abc.doc. Then what you save in the database is doc/abc.doc
    2. Use nginx and other configurations to configure the external network to access the directory. Configure the root directory to src, and that’s it

    reply
    0
  • Cancelreply