播放中的附件! dotcloud 上的框架

发布于 2024-12-01 15:58:29 字数 198 浏览 5 评论 0原文

我使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只想待在家 2024-12-08 15:58:29

我认为这里有两个问题。首先,您的路径缺少初始的“/”作为完整路径(我假设这是您的意图):

attachments.path=/home/dotcloud/uploads

其次,我不确定您的 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):

attachments.path=/home/dotcloud/uploads

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文