johndoee's avatar

The file "C:\xampp\tmp\php587C.tmp" does not exist

when I upload video file,

The file "C:\xampp\tmp\php587C.tmp" does not exist

error occur. here is my controller codes

elseif ($request->media_type == 'upload') {
                if (\Illuminate\Support\Facades\Request::hasFile('video_file')) {
                    $file = \Illuminate\Support\Facades\Request::file('video_file');
                    $filename = time() . '-' . $file->getClientOriginalName();
                    $size = $file->getSize() / 1024;
                    $path = public_path() . '/storage/uploads/';
                    $file->storeAs($path, $filename);

                    $video_id = $filename;
                    $url = asset('storage/uploads/' . $filename);

                    $media = Media::where('type', '=', $request->media_type)
                        ->where('model_type', '=', 'App\Models\Lesson')
                        ->where('model_id', '=', $course->id)
                        ->first();
                        ;
                }


config filesystem.php

 'disks' => [

        'local' => [
            'driver' => 'local',
            'root' => public_path('app'),
        ],



what wrong in this codes

0 likes
3 replies
johndoee's avatar

@Sinnbeck


 C:\Users\PC\Desktop\codecanyon-23641351-neonlms-learning-management-system-php-laravel-script\NEON LMS v2.1.8\neon-lms-app\vendor\symfony\http-foundation\File\File.php

     
    /**
     * A file in the file system.
     *
     * @author Bernhard Schussek <[email protected]>
     */
    class File extends \SplFileInfo
    {
        /**
         * Constructs a new file from the given path.
         *
         * @param string $path      The path to the file
         * @param bool   $checkPath Whether to check the path or not
         *
         * @throws FileNotFoundException If the given path is not a file
         */
        public function __construct(string $path, bool $checkPath = true)
        {
            if ($checkPath && !is_file($path)) {
                throw new FileNotFoundException($path);
            }
     
            parent::__construct($path);
        }
     

Please or to participate in this conversation.