【发布时间】:2016-09-20 07:24:25
【问题描述】:
我有一个通过 ajax 将数据发布到控制器的表单。
// Create new upload instance
$upload = Upload::create();
// Create new file instance
$file = File::create();
// Upload the file
$upload->loadIntoFile($fileData, $file, $this->folderName);
// Get the file from the Upload
$uploadedFile = $upload->getFile();
// Get the file from the Upload
$write = $uploadedFile->write();
图片上传成功,但文件未写入文件表。
没有错误报告。
【问题讨论】:
-
这可能更适合SilverStripe issue tracker,因为 4.x 仍处于 alpha 阶段
-
@RobbieAverill 是的,我认为这可能是我做错了,我在 SS3 上尝试过,并且文件写入正确。我在 repo 上记录了一个错误。
-
我投票结束这个问题,因为它是关于 SilverStripe 4 的预稳定 alpha 版本
标签: silverstripe