Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: Body request ::
- ---------------------------acebdf13572468
- Content-Disposition: form-data; name="ProfilePic"; filename="power of life.jpg"
- Content-Type: image/jpeg
- <@INCLUDE *C:\Users\Hp\Pictures\power of life.jpg*@>
- ---------------------------acebdf13572468--
- :: how I check ::
- // if there are profile pic
- if ($request->files->has('ProfilePic')) {
- $profilePic = $request->files->get('ProfilePic');
- $user->upload($profilePic);
- }else{
- $view = $this->view(array('StatusCode' => 400, 'ErrorDesc' => 'No profile picture found'), 400);
- return $this->handleView($view);
- }
- :: fos_rest config ::
- fos_rest:
- param_fetcher_listener: true
- body_listener: true
- format_listener: true
- view:
- view_response_listener: 'force'
Advertisement
Add Comment
Please, Sign In to add comment