Device does not have internet connectivity, there are going to be several more like this.
There isn't enough flash to upgrade RouterOS
Free Space = 6.8MiB
routeros-mipsbe-6.39.3.npk = 9.9MB
I've tried transferring the file to root (memory?), but when I reboot, the file is deleted and the OS does not upgrade.
You've chosen wrong architecture. Also, is there a good reason why you don't want to use current stable version (6.40.4) for your router?
I suggest you to download
current version.
The .npk file should be uploaded into root folder. It will be placed into ram, so there is plenty of free space. After that router should be rebooted and upgrade procedure will start automatically.
Also the .npk files are protected from changes, so there is a chance your file could be changed\damaged during transfers from internet or usb drive or whatever.
You can check its hash sum to be sure it wasn't damaged:
MD5 routeros-mmips-6.40.4.npk: 61aad1990820481e3c209cf938b4783d
SHA256 routeros-mmips-6.40.4.npk: 8c6ea12fa963a521ee4748372e22f5a88e757704dba566e2ebe4139359cd6e9e