OTA via BLE

Any one know how to do OTA via ble. I am using ESP32 chip, and my project require to update firmware via ble. anyone has experience about his. At the moment esp32 can receive bin file from tablet via BLE. but it seems not able to write into flash directly. I may need some security stuff.

Thanks