mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 16:23:16 +00:00
Update AP Helpers
This commit is contained in:
parent
6e5ffa9440
commit
8d865dd384
1 changed files with 2 additions and 2 deletions
|
@ -341,8 +341,8 @@ class Helpers {
|
||||||
// pleroma attachment fix
|
// pleroma attachment fix
|
||||||
$url = str_replace(' ', '%20', $url);
|
$url = str_replace(' ', '%20', $url);
|
||||||
|
|
||||||
$img = file_get_contents($url, false, stream_context_create(['ssl' => ["verify_peer"=>false,"verify_peer_name"=>false]]));
|
$img = file_get_contents($url, false, stream_context_create(['ssl' => ["verify_peer"=>true,"verify_peer_name"=>true]]));
|
||||||
$file = '/tmp/'.str_random(16).$info['basename'];
|
$file = '/tmp/'.str_random(32);
|
||||||
file_put_contents($file, $img);
|
file_put_contents($file, $img);
|
||||||
$fdata = new File($file);
|
$fdata = new File($file);
|
||||||
$path = Storage::putFile($storagePath, $fdata, 'public');
|
$path = Storage::putFile($storagePath, $fdata, 'public');
|
||||||
|
|
Loading…
Reference in a new issue