Accepted answer

You are expecting the file in JSON response, but when you access the file using $request->file('myFile'), It returns an instance of Illuminate\Http\UploadedFile, and when you're returning the json, it's going to return an empty object since Illuminate\Http\UploadedFile is not converted into json like models are since it does not have the toJson() method on it.

if you dump and die $request->file('myFile')

 Route::post('/tickets/createFile', function (Request $request){

You must be able to see your uploaded file Object. So you can proceed ahead with storing the file using Storage::put() method

Related Query

More Query from same tag