title: Upload Images to Laravel-Lumen API
body: <p>With my API i need to upload images from mobile app to my server and save the image path to database  so i have the following issues : </p>
  
  <ul>
  <li><p>Where to save the images? I tried to save them in the storage/app
  under images folder (which is work fine)</p>
  
  <pre><code>   public function fileUpload(Request $request) {
  
  
     if ($request-&gt;hasFile('image')) {
         $image = $request-&gt;file('image');
         $name = time().'.'.$image-&gt;getClientOriginalExtension();
         $destinationPath = storage_path('/app/images');
         $image-&gt;move($destinationPath, $name);
  
  
         return response()-&gt;json(['data'=&gt;"image is uploaded"]);
     }
  </code></pre>
  
  <p>}</p>
  
  <p>and make a symbolic link to this folder in the public folder but its
  not working due to access permission error which will lead to the
  other issue.</p></li>
  <li><p>What permission should i gave to the storage folder to make the whole
  operation works save the images and the saved link is readable (even 777 didn't work) <strong>Access forbidden!</strong></p>
  
  <p>sudo chmod -R 777 storage</p></li>
  </ul>
  
  <p>Any ideas will be much appreciated </p>