That's something I'd expect from Linux not Windows.
May be windows is getting smarter (stricter) after all. May be try setting a recursive permission on /public/img/userImages. Cannot check this, no windows m/c
I'm using L5.1 on Windows 10/Apache as my server, and I want to upload a file to /public/img/userImages , to do that I manually created the folder userImages and used this in my UserController:
if($request->image)
{
$imageName = $request->username . '.' . $request->file('image')->getClientOriginalExtension();
$request->file('image')->move(base_path() . '/public/img/userImages/', $imageName);
}
$user = User::findOrFail($id);
$user->update($request->all());
flash('User updated', 'success');
return redirect('users')
The image is uploaded successfully but it doesn't show in the browser and I have to manually change Windows permissions to open it in file explorer. After I change permissions to Everyone, then it's shown correctly in browser. It happens to every file uploaded. That's something I'd expect from Linux not Windows.
Any suggestions?
userImage folder was marked as read only, I unchecked that on Windows Explorer and now files are showing correctly in the browser.
Please or to participate in this conversation.