uploadProfilePicture

@PostMapping(value = "/image/upload")
open fun uploadProfilePicture(@RequestParam(value = "file") file: MultipartFile, session: HttpSession): ResponseEntity<OperationSuccessfulResponse>

Handles uploading profile pictures for authenticated users.

Return

ResponseEntity with OperationSuccessfulResponse; HTTP status 200 OK if upload succeeds, 401 UNAUTHORIZED if the session is invalid or unauthenticated, or 500 INTERNAL_SERVER_ERROR on I/O issues

Author

Oliver Lear Sigwarth (theoliverlear)

Parameters

file

image file uploaded by the user; must be a valid MultipartFile

session

current HTTP session for user authentication and session validation

See also

ProductUser
ProfilePicture
SessionService
ProfilePictureOperations
ProductUserService