简体   繁体   English

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

[英]Attachments in Play! Framework on dotcloud

I uploaded files to the server using BLOB db type on play framework. 我在播放框架上使用BLOB db类型将文件上传到服务器。 In the application.conf file I have 在application.conf文件中

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. 问题是,如果我重新启动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. 其次,我不确定您的Play服务器是否有权写入该文件夹,因为它位于应用程序上下文路径之外。 Default folder is local to the application and Play can write it, not so sure about other folders though. 默认文件夹位于应用程序本地,而Play可以写入它,但是对于其他文件夹并不确定。 You should double check that. 您应该仔细检查。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM