ajax를 통해 컨트롤러에 데이터를 게시하는 양식이 있습니다.파일을 SilverStripe 4의 프런트 엔드 양식에서 데이터베이스에 저장할 수 없습니다.
// 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 문제 추적기]에 더 적합 할 수도 있습니다 (https://github.com/silverstripe/silverstripe-framework/issues) 4.x의는 알파 단계에 아직도 있기 때문에 –
@RobbieAverill 그래, 내가 잘못하고 있다고 생각했는데, SS3에서이 파일을 시험해 본 결과 파일이 올바르게 쓰여졌다. 나는 repo에 버그를 기록했다. – nickspiel
이 질문은 SilverStripe 4 – wmk