Skip to content

[5.2] After move of uploaded file, missing temp file error.  #12350

Closed
@trwilliams

Description

@trwilliams

This will give an error

public function addPost(ImageAddRequest $request) { if ($request->hasFile('image')){ $path = base_path()."/public/storage/pages/"; $image = $request->file('image'); $image->move($path, $image->getClientOriginalName()); $name = $request->name; } }
any instance of request after move gives and error that the temp file can not be found.

found exactly the line that is causing issue.

laravel/framework/src/Illuminate/Http/UploadedFile.php
Line 50

If I remove instanceof static it works fine.

The function is called from laravel/framework/src/Illuminate/Http/Request.php
Line 419

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions