Unable to write file into folder
<p>hello i am still new to make localhost project into putty server and i also use fileZilla.</p>

<p>my upload image function is working fine in localhost but when i tried it in the server. the error happened like this
<a href="https://i.stack.imgur.com/5KrUW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5KrUW.png" alt="fileException"></a></p>

<p>and here is my controller </p>

<pre><code>public function uploadPic(Request $request)
{
    $rules = ['image' =&gt; 'required|image|max:1024*1024*1'];

    $validator = \Validator::make($request-&gt;all(),$rules);

    if($validator-&gt;fails())
    {
        return redirect('profile')-&gt;withErrors($validator);
    }
    else
    {
        $file = $request-&gt;file('image');
        $file-&gt;move(public_path("profile-image/"), $file-&gt;getClientOriginalName());
        $thisUser = \Auth::id();

        $result = User::where('id','=',$thisUser)-&gt;update(['path_gambar'  =&gt; $file-&gt;getClientOriginalName()]);
    }
    return redirect('profile');
}
</code></pre>

<p>and here is the view blade</p>

<pre><code>&lt;form class="form-group-sm" action="{{ url('/upload-image') }}" method="post" enctype="multipart/form-data"&gt;
                &lt;input id="token" type="hidden" name="_token" value="{{ csrf_token() }}"&gt;
                &lt;div&gt;
                    &lt;input type="file" class="btn" name="image" id="file"&gt;
                &lt;/div&gt;
             &lt;span class="help-block"&gt;
                 &lt;strong&gt;{{ $errors-&gt;first('image') }}&lt;/strong&gt;
             &lt;/span&gt;
                &lt;div style="text-align: inherit"&gt;
                    &lt;button type="submit" class="btn btn-group-sm" value="upload" name="Submit"&gt;Upload&lt;/button&gt;
                &lt;/div&gt;
            &lt;/form&gt;
</code></pre>