i have a task is update firmware. In Javascript file have a step to check file upload size must be smaller than Image size. I don't know different bettween they and how to get Image size. Many thank for any help!!
you're asking us how to get the size of a file/image in JS ?
I think we need way more info...
Are you trying to develop a web page, where users can update the firmware? Or perhaps modify the current one?
Are you sure that checking file sizes from JS is a good idea?
As I understand it, by this term the author means the size of the partition where the file will be written.
…and there is no answer to this, as it depends on the device. Quite a lot of devices have different constraints for the kernel partition and the rootfs+overlay, basically anything modern with NAND and ubi. The total file size doesn't really matter there, as long as it fits into the tmpfs on RAM, but the js implementation would have to be a lot smarter with device- and image specific knowledge about the various limits (and re-implementing that again in js is not necessarily a good idea).