See this StackExchange answer. You didn’t share any of your code, so we have no idea what you’re actually doing, but probably you’re not specifying a location where the images should be shared, or the folder you’re specifying doesn’t exist.
Feb 20, 2023
11
Level 1
Error uploading image on laravel 9
I have an api to update user image, this works fine but the response shows this message and ruins all json format
<br />
<b>Notice</b>: PHP Request Startup: file created in the system's temporary directory in <b>Unknown</b> on line <b>0</b><br />
{
"status": "200",
"message": "user updated"
...
}
I checked the "upload_tmp_dir" on php.ini and exists, also i run a chmod 777 just in case.
This is the path of upload_tmp_dir "D:\Program Files\Xampp\tmp" (windows)
I tried adding "error_reporting()" on the index.php but it didn't work
UPDATE: sharing code
$path = Storage::disk('public')->put(env('PROFILE_IMGS'), $file);
Im uploding images like that, the image uploads fine, i have no problem with functionality, my problem is with that response that breaks the json.
Level 1
I just solved it, it was a permission problem with windows, i had xampp installed in D:/, I reinstalled to C:/ and the warning disappeared. Even so,thanks for the help.
Please or to participate in this conversation.