mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-11 18:56:21 +00:00
cleanup
This commit is contained in:
@@ -27,6 +27,7 @@ $url = trim($_REQUEST['url']);
|
||||
|
||||
if(!$url || !startsWith($url, 'http'))
|
||||
exit(json_encode(array('status'=>'err','reason'=>'Invalid URL')));
|
||||
|
||||
//@todo: let user decide max upload size via config and set php_ini var
|
||||
else if(remote_filesize($url)*0.000001 > 20)
|
||||
exit(json_encode(array('status'=>'err','reason'=>'File too big. 20MB max')));
|
||||
@@ -43,8 +44,6 @@ $ehash = sha1Exists($sha1);
|
||||
if($ehash && file_exists(ROOT.DS.'data'.DS.$ehash.DS.$ehash))
|
||||
exit(json_encode(array('status'=>'ok','hash'=>$ehash,'filetype'=>$type,'url'=>URL.$ehash)));
|
||||
|
||||
|
||||
|
||||
//cross check filetype for controllers
|
||||
//
|
||||
//image?
|
||||
|
||||
Reference in New Issue
Block a user