[RSS Feed/News] Post file upload, how to map data:// folder to img src?

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
My file upload code is working fine, first hurdle passed. Now onto the second one......

I'm uploading it in the data:// directory using the following code:

PHP:

Code:
$uploads = $this->request->getFile('upload', false, false);
if($uploads)
{
    $uploads->requireImage();
    if (!$uploads->isValid($errors))
    {    
        return $this->error($errors[0]);
    }
 
    $dataDir = \XF::app()->config('externalDataPath');
    $datDir .= "://foo/bar/xyz.png"...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom