Save Firmware Image to external spi Image by DFU


I have a custom board with nRF52832 with external spi flash  and I'm using SDK 17.1 and softdevice s132 4.0.5. I will use OTA-DFU to receive the new firmware image from mobile over BLE and I will save it on external spi flash. Once whole firmware image is downloaded and verified, I want to execute the bootloader and update the firmware. As I know, the steps to do this are:

* Download image to external spi flash and verify it

* Save image settings like CRC, length, etc. to external spi flash

* Copy the image and settings to the internal flash of nRF52

* Enter to bootloader and load the image saved in bank1 of internal flash.

DFU OTA works normally with internal flash I can receive firmware image  from BLE  and saved in internal flash but how cad directly save firmware image to external spi flash and then copy it to internal and start app

Thanks in advance.