Level 29
Its says what it says No such file or directory. What is $this->avatar ?
I'm trying to store uploaded images to s3. The storage and retrieval works fine, however, when I try to store using a queued job, I receive the following error:
[ErrorException]
file_get_contents(users/avatars/avatar_104_IMG_0518.jpg): failed to open stream: No such file or directory
I am using beanstalkd as my queue driver. Here is the handle method on my job:
public function handle()
{
// Store the file
Storage::put(
'avatars/' . $this->user->id,
file_get_contents($this->avatar),
'public'
);
// Set the new avatar
$this->user->changeAvatar();
// Delete the image file
unlink($this->avatar);
}
So for some reason file_get_contents() is not working from within the Job.
Anyone have any ideas?
Thanks, Gary
Please or to participate in this conversation.