Main function here is the capture function. All attrs are currently fixed.
The server fetches the saved image, in order to not have read/write conflict we first save captured image as 'assets/foo.jpg' and after capture rename it to 'assets/capture.jpg'.