Update RemoteFollow job

pull/1398/head
Daniel Supernault 2019-06-10 22:08:40 -06:00
rodzic f0455b0454
commit 5b55165acd
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -56,7 +56,7 @@ class RemoteFollowImportRecent implements ShouldQueue
*/
public function handle()
{
$outbox = $this->fetchOutbox();
// $outbox = $this->fetchOutbox();
}
public function fetchOutbox($url = false)
@ -216,7 +216,7 @@ class RemoteFollowImportRecent implements ShouldQueue
$info = pathinfo($url);
$url = str_replace(' ', '%20', $url);
$img = file_get_contents($url);
$file = '/tmp/'.str_random(12).$info['basename'];
$file = '/tmp/'.str_random(64);
file_put_contents($file, $img);
$path = Storage::putFile($storagePath, new File($file), 'public');
@ -230,6 +230,8 @@ class RemoteFollowImportRecent implements ShouldQueue
$media->save();
ImageThumbnail::dispatch($media);
@unlink($file);
return true;
} catch (Exception $e) {