1 year ago

File Storage with Job dispatching

Posted 1 year ago by xtremer360

I'm attempting to get an array of files that were uploaded in a form and then send each file to a job for uploading to AWS S3 bucket and when the form submits with uploaded files I receive this error.

Failed because Unable to JSON encode payload. Error code: 5

foreach ($files as $file) {
    $returnedStoredFile = Storage::putFile('/roofing/projects/' . $project->id . '/contract-assets/'.Carbon::now()->toDateString(), $file);
    dispatch(new ProcessRoofingProjectContractAssets(Storage::get($returnedStoredFile), $project));

Please sign in or create an account to participate in this conversation.