custom timeouet for curl'ing upload urls
This commit is contained in:
parent
c8fcba9439
commit
e45ffb8592
@ -355,6 +355,8 @@
|
|||||||
// Allow "uploading" images via URL as well. Users can enter the URL of the image and then Tinyboard will
|
// Allow "uploading" images via URL as well. Users can enter the URL of the image and then Tinyboard will
|
||||||
// download it. Not usually recommended.
|
// download it. Not usually recommended.
|
||||||
$config['allow_upload_by_url'] = false;
|
$config['allow_upload_by_url'] = false;
|
||||||
|
// The timeout for the above, in seconds.
|
||||||
|
$config['upload_by_url_timeout'] = 15;
|
||||||
|
|
||||||
// A wordfilter (sometimes referred to as just a "filter" or "censor") automatically scans users’ posts
|
// A wordfilter (sometimes referred to as just a "filter" or "censor") automatically scans users’ posts
|
||||||
// as they are submitted and changes or censors particular words or phrases.
|
// as they are submitted and changes or censors particular words or phrases.
|
||||||
|
2
post.php
2
post.php
@ -291,7 +291,7 @@ if (isset($_POST['delete'])) {
|
|||||||
curl_setopt($curl, CURLOPT_FAILONERROR, true);
|
curl_setopt($curl, CURLOPT_FAILONERROR, true);
|
||||||
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
|
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
|
||||||
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
|
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
|
||||||
curl_setopt($curl, CURLOPT_TIMEOUT, 15);
|
curl_setopt($curl, CURLOPT_TIMEOUT, $config['upload_by_url_timeout']);
|
||||||
curl_setopt($curl, CURLOPT_USERAGENT, 'Tinyboard');
|
curl_setopt($curl, CURLOPT_USERAGENT, 'Tinyboard');
|
||||||
curl_setopt($curl, CURLOPT_BINARYTRANSFER, true);
|
curl_setopt($curl, CURLOPT_BINARYTRANSFER, true);
|
||||||
curl_setopt($curl, CURLOPT_FILE, $fp);
|
curl_setopt($curl, CURLOPT_FILE, $fp);
|
||||||
|
Loading…
Reference in New Issue
Block a user