PHP Upload file

I followed the example but just couldn’t get it tot work…

something like:


$file = new File();
$file->setPath('/home/user/photo/myphoto.png');
     
Backendless::$Files->upload( $file, "mypics" );

Keep getting this error:
Fatal error: Class ‘backendless\services\Exception’ not found inD:\vendor\backendless\src\services\Files.php on line 92

What am I doing wrong here?

Hi Peter,

Try

Backendless::$Files->upload( $file );

or

Backendless::$Files->upload( '/home/user/photo/myphoto.png' );

Regards,

Denys

Have the same problem and this is not working sir still getting the error

Is this issue solved?