播放中的附件! dotcloud 上的框架
我使用 BLOB db 类型 on play 框架将文件上传到服务器。在 application.conf 文件中,我有
attachments.path=home/dotcloud/uploads
但我在服务器上找不到这些文件。
问题是,如果我重新启动 www 服务,那么我会丢失所有文件,只有数据库记录。
I uploaded files to the server using BLOB db type on play framework. In the application.conf file I have
attachments.path=home/dotcloud/uploads
But I couldn't find the files on the server.
The issue is that if I restart my www service, then I lose all my files, I only have the db records.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这里有两个问题。首先,您的路径缺少初始的“/”作为完整路径(我假设这是您的意图):
其次,我不确定您的 Play 服务器是否有权写入该文件夹,因为它位于应用程序之外上下文路径。默认文件夹是应用程序的本地文件夹,Play 可以写入它,但不太确定其他文件夹。你应该仔细检查一下。
I believe that there are two issues in here. First your path lack a initial '/' to be a full path (I'm assuming that was your intention):
Second, I'm not sure that your Play server will have rights to write to that folder, as it's outside the application context path. Default folder is local to the application and Play can write it, not so sure about other folders though. You should double check that.