File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -43,11 +43,16 @@ public function isAvailable(FileInfo $file): bool {
4343 }
4444
4545 private function connectDirect (File $ file ): string |false {
46+ if (stream_get_meta_data ($ file ->fopen ('r ' ))['seekable ' ]!== true ) {
47+ return false ;
48+ }
49+
4650 // Checks for availability to access the video file directly via HTTP/HTTPS.
4751 // Returns a string containing URL if available. Only implemented and tested
4852 // with Amazon S3 currently. In all other cases, return false. ffmpeg
4953 // supports other protocols so this function may expand in the future.
5054 $ gddValues = $ file ->getStorage ()->getDirectDownload ($ file ->getName ());
55+
5156 if (is_array ($ gddValues )) {
5257 if (array_key_exists ('url ' , $ gddValues ) && array_key_exists ('presigned ' , $ gddValues )) {
5358 $ directUrl = (str_starts_with ($ gddValues ['url ' ], 'http ' ) && ($ gddValues ['presigned ' ] === true )) ? $ gddValues ['url ' ] : false ;
You can’t perform that action at this time.
0 commit comments