Snapey
Snapey
4 months ago (931,175 XP)

oh for flip sake

The point of putting the dd INSIDE the if section was to see if you were detecting the uploaded file

so no then. I suggest you go back and look at earlier answers again

Snapey
Snapey
4 months ago (931,175 XP)

start with basics.

check what $request contains

inzmam

Yeah i have tried previous answers also, when i am keeping this code

 $vid->filename='inzmam';
 $vid->path='ul haq';

inside the if section to check if this string is printed, then also it does not print it. What i want to bring it to your notice is, my if section itself is not being executed at all. What could be possible reasons for this.

Snapey
Snapey
4 months ago (931,175 XP)

start with basics.

check what $request contains

most likely issue is that your upload field is not called Upload_video

inzmam

Yeah same i have tried to check if at least it contains the name of the file, then it does not contain the name also because if section is not being executed.

I am surprised when i am uploading the images instead videos, it contains all the details of images but it does not contain the video details while uploading the same.

Snapey
Snapey
4 months ago (931,175 XP)

start with basics.

check what $request contains

inzmam

Keeping

 $video=$request->file('Upload_video');
 dd($video);

outside the if section, it shows me the file details but when keep the same code inside the if block it does not. Just wanted to know from you what are the possible reasons for @if section not being excuted.

Snapey
Snapey
4 months ago (931,175 XP)

show your form

inzmam

thanks for your reply @Snapey . Issue is fixed now. When i use has() instead of hasFile() it finds the file, after that there was an issue of file size which i fixed it by modifying the correct php.ini file.

Thanks to all of you who have been with me for so long.

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