With NetOS 7.4 and digi ESP I have found the simplest method to use is to base your project on the standard Digi code.
If you simply do File/New/NetOS Project, and follow the Wizard ensuring that you include the Web server and the FTP server, you will get an outline project that supports Firmware upload of both image.bin (for the main application), and rom.bin (for the bootloader). This upload works on bot FTP or you can use a web browser to do it via HTTP.
Once you have got this working correctly you can then pull your existing code into the project. This is the simplest way to do it and all the had work is done for you unless you want to do anything really special.
Alternatively you could just build a project in this manner and then review exactly how it works to get some ideas of where you have problems with the code you are currently using.
There is also a little application the allows you to merge the rom.bin and image.bin into a sigle upload that will update both the bootloader and the application at the same time. This is very usefull if you want to load the application at a non standard address.