我終於開始在我的項目中測試外部文件存儲系統,並在嘗試分析其中一些文件時遇到奇怪的錯誤。Laravel getID3無法從S3中拉取文件
我想要實現:抓住所有的文件列表中的某個S3目錄(完成),並使用PHP包通過他們的ID3標籤對它們進行分析:
https://packagist.org/packages/james-heinrich/getid3
$files = Storage::disk('s3')->files('going/down/to/the/bargin/basement/because/the/bargin/basement/is/cool'); //Get Files
$file = Storage::disk('s3')->url($files[0]); // First things first... let's grab the first one.
$getid3 = new getID3; // NEW OBJECT!
return $getid3->analyze($file); // analyze the file!
然而,當我把那個到鼓搗它叫聲回我:
"GETID3_VERSION" => "1.9.14-201703261440",
"error" => [
"Could not open "https:/bangerz-army-qa.s3.us-east-2.amazonaws.com/library/pending/admin/01%20-%20Cathedrals.mp3" (!is_readable; !is_file; !file_exists)",
],
這似乎表明該文件無法讀取?這是我第一次使用AWS S3,因此可能有些事情我沒有正確配置。
啊哈!我有一種感覺可能是它的一部分。現在文件存儲文檔看起來有點亮,那麼如何將文件從磁盤移動到網站上的臨時文件夾? –
現在我得到一個hashName()字符串錯誤?看着laravel文檔,我有點困惑。它看起來像推薦的用途是上傳? –