Play Framework 1.4 staticDir 路由
Play Framework 1.4 staticDir routes
我需要在特定目录中保存用户发送的图片数量,
然后渲染此图像
我正在尝试使用 staticDir 路由,如下所示:
GET /test/* staticDir:/var/www/images
但是当我访问 url http://localhost:9000/test/test.png 时,响应是 'not found' 'the file /var/www/images/test.png does not exist'
但文件存在于此路径
有人知道哪里出了问题吗?
谢谢
Play的staticDir只能路由到项目根目录下。 /var/www/images
看起来像系统级路径。您可能可以从那里设置一个符号 link 到项目主页中的图像文件夹
我需要在特定目录中保存用户发送的图片数量, 然后渲染此图像
我正在尝试使用 staticDir 路由,如下所示:
GET /test/* staticDir:/var/www/images
但是当我访问 url http://localhost:9000/test/test.png 时,响应是 'not found' 'the file /var/www/images/test.png does not exist'
但文件存在于此路径
有人知道哪里出了问题吗?
谢谢
Play的staticDir只能路由到项目根目录下。 /var/www/images
看起来像系统级路径。您可能可以从那里设置一个符号 link 到项目主页中的图像文件夹