Flashing local files through wifi

Is it possible to flash a .ino program from a local file through wifi? Not through the online IDE, but essentially doing the same thing.

I want to have the ability for my mobile app to flash different programs to the photon. The necessary files could be stored locally or downloaded from a server, then I would need to somehow upload them to the photon. If the app can connect and set wifi credentials, then it seems plausible to some how perform the same thing the IDE does.

Any help is much appreciated!

Yes it’s possible.

Take a look at these 2 cloud API commands.

For compiling source code then flashing:
https://docs.particle.io/reference/api/#flash-a-device-with-source-code

For flashing a pre-compiled binary:
https://docs.particle.io/reference/api/#flash-a-device-with-a-pre-compiled-binary