mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 16:25:22 +03:00
Remove size limit of local flash file
This commit is contained in:
parent
e38afdcf46
commit
f1ec75e939
2 changed files with 1 additions and 17 deletions
|
@ -379,22 +379,9 @@ TABS.firmware_flasher.initialize = function (callback) {
|
|||
analytics.setFirmwareData(analytics.DATA.FIRMWARE_NAME, file.name);
|
||||
var reader = new FileReader();
|
||||
|
||||
// Max size in bytes of the local file to load and flash
|
||||
const MAX_FLASH_LOCAL_FILE_SIZE = 2*1024*1024;
|
||||
|
||||
reader.onprogress = function (e) {
|
||||
if (e.total > MAX_FLASH_LOCAL_FILE_SIZE) {
|
||||
reader.abort();
|
||||
}
|
||||
};
|
||||
|
||||
reader.onloadend = function(e) {
|
||||
if (e.total > MAX_FLASH_LOCAL_FILE_SIZE) {
|
||||
|
||||
console.log('File limit (' + MAX_FLASH_LOCAL_FILE_SIZE + ') exceeded, aborting');
|
||||
$('span.progressLabel').text(i18n.getMessage('firmwareFlasherTooBig', e.total));
|
||||
|
||||
} else if (e.total != 0 && e.total == e.loaded) {
|
||||
if (e.total != 0 && e.total == e.loaded) {
|
||||
|
||||
console.log('File loaded (' + e.loaded + ')');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue