R
RisteDimitrievski
Guest
PHP:
Read more
Continue reading...
Code:
public function getUploadedFilePath(\XF\Http\Upload $filename)
{
if($filename->isImage())
{
$visitor = XF::visitor();
$fname = $filename->getFileName();
$data = "data/{$visitor->user_id}/{$fname}";
return $data;
}
}
public function validateFile(\XF\Http\Upload $fileName)
{
if($fileName instanceof XF\Http\Upload)
{
$fileName->setAllowedExtensions(['jpg','png','jpeg'])...
Read more
Continue reading...