我在播放框架上使用 BLOB db 类型将文件上传到服务器。在 application.conf 文件中我有
attachments.path=home/dotcloud/uploads
但是我在服务器上找不到文件。
问题是,如果我重新启动 www 服务,那么我会丢失所有文件,我只有 db 记录。
我在播放框架上使用 BLOB db 类型将文件上传到服务器。在 application.conf 文件中我有
attachments.path=home/dotcloud/uploads
但是我在服务器上找不到文件。
问题是,如果我重新启动 www 服务,那么我会丢失所有文件,我只有 db 记录。
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.