【问题标题】:Moving uploaded files in Socialengine在 Socialengine 中移动上传的文件
【发布时间】:2017-07-28 17:32:15
【问题描述】:

我尝试通过使用社交引擎中的浏览操作将上传的文件从 /public/user/ 移动到 /Files/SE/
1. $fileobj = new Zend_Cloud_StorageService_Adapter_FileSystem(); $fileobj->moveItem($sourcePath, $destinationpath);

  1. move_uploaded_file($sourcePath, $destinationpath); 这两个都无法移动文件。我也检查了路径,它们是完美的并且可以与其他框架一起使用

【问题讨论】:

  • 这方面有什么帮助吗?

标签: socialengine


【解决方案1】:

您应该使用Storage 模块的API,它允许您创建临时文件(当您需要调整图像大小或转换视频时),然后将它们放入公共存储中。此文件将在engine4_storage_files 表中进行跟踪。

【讨论】:

    【解决方案2】:

    我通过使用 storage > Model > DbTable > Files.php 下的 createSystemFile() 函数来实现它

    我创建了一个类似的函数,并将 parent_type 作为我想在文件中移动的文件夹。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-07-09
      • 1970-01-01
      • 2017-09-03
      • 1970-01-01
      • 2016-10-08
      • 2012-05-25
      • 2011-10-07
      相关资源
      最近更新 更多