Upload resume fails

44 views
Skip to first unread message

Dirk Schaap

unread,
Jul 14, 2015, 7:08:03 AM7/14/15
to cats...@googlegroups.com
I'm trying to upload a resume via add_candidate function but I can't get it to work! I think I tried everything but it still fails.

In the catsapi.php the resume field says: * @param string $resume (full path to local file). Is this the absolute path like ' /var/www/vhosts/....'  or the 'http://<domain>' path?

This is what I tried for the resume path:
- $_FILES['resume']['name']
- $_FILES['resume']['tmp_name']
- Did a move_uploaded_file to save it (and chmod-ed it to 0777) before adding it with either the absolute path or 'http://'
  
   $file_name = "uploads/".$_FILES['resume']['name'];
   $file_temp
= $_FILES['resume']['tmp_name'];
   
if( move_uploaded_file($file_temp, $file_name) )
   
{
       
....
   
}

I got the next notification: Notice: Trying to get property of non-object in /var/www/vhosts/.../libraries/catsapi.php on line 587 0
I also got the notification:      curl_setopt(): The usage of the @filename API for file uploading is deprecated         which I disabled with error_reporting(E_ALL ^ E_DEPRECATED );

Can someone help me with this?

ma...@hallme.com

unread,
Jul 14, 2015, 9:53:32 AM7/14/15
to cats...@googlegroups.com
The resume should be the full path with an @ symbol before it. So you should pass it something like:
'@/var/www/vhosts/.../uploads/' . $_FILES['resume']['name']

ma...@hallme.com

unread,
Jul 14, 2015, 9:55:15 AM7/14/15
to cats...@googlegroups.com
Opps, my mistake. The catsapi.php class adds the @ symbol for you. So it should be just:
'/var/www/vhosts/.../uploads/' . $_FILES['resume']['name']

Dirk Schaap

unread,
Jul 15, 2015, 4:59:39 AM7/15/15
to cats...@googlegroups.com
Got it working... Thanks for the help...
Reply all
Reply to author
Forward
0 new messages