Methods
blobToBase64(blob) → {Promise}
This function simply converts the Blob data given as input to a base64 string.
Parameters:
Name | Type | Description |
---|---|---|
blob |
Object |
Returns:
Promise on the converted base64
- Type
- Promise
fileSelectedHandler(event)
Picks up the file selected by user and converts it to base64 image and updates the state of component accordingly.
Parameters:
Name | Type | Description |
---|---|---|
event |
Object | Event object |
filterHandler(event)
This function applies filter to the uploaded image, and updates the state of the component accordingly.
Parameters:
Name | Type | Description |
---|---|---|
event |
event | Event object |
onImageContainerClick()
This function simply makes a click to actual Input Element.
render()
Renders the input form based on current state of the component.
textInputHandler(event)
Executes at each keystroke of user for any input text field in the component. As soon as it receives any keystroke from user, this method updates the state of the component accordingly.
Parameters:
Name | Type | Description |
---|---|---|
event |
Object | Event object |
uploadHandler()
Once the user is happy with their image, caption and filters this function fires up as soon as they click "Create a memory". Further, the memory data is sent to the backend.