jeudi 18 juin 2020

I'm making an app with Expo and want to upload image using laravel 5.6 backend

I am trying to upload an image from my react native expo app. when I submit form data with image to laravel 5.6 backend Everything works great on the app and on the backend, but when I submit form data without image file it returns response of network request failed in the promise. so basically i need to apply validation which is where I am having trouble. So far laravel validations I have tried:

$request->hasFile('fileToUpload')

$request->has('fileToUpload')

$request->fileToUpload != null

$request->get('fileToUpload')

Please help me out.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire