| 109 | } |
| 110 | |
| 111 | bool Wigle::upload(FS *fs, String filepath, bool auto_delete) { |
| 112 | display_banner(); |
| 113 | |
| 114 | if (!fs || !get_user()) return false; |
| 115 | |
| 116 | dump_wigle_info(); |
| 117 | |
| 118 | File file = fs->open(filepath); |
| 119 | if (!file) { |
| 120 | displayError("Failed to open Wigle file", true); |
| 121 | return false; |
| 122 | } |
| 123 | |
| 124 | if (!_upload_file(file, "Uploading...")) { |
| 125 | file.close(); |
| 126 | displayError("File upload error", true); |
| 127 | return false; |
| 128 | } |
| 129 | |
| 130 | file.close(); |
| 131 | if (auto_delete) fs->remove(filepath); |
| 132 | |
| 133 | displaySuccess("File upload success", true); |
| 134 | return true; |
| 135 | } |
| 136 | |
| 137 | bool Wigle::upload_all(FS *fs, String folder, bool auto_delete) { |
| 138 | Serial.println("Wigle upload all path: " + folder); |
no test coverage detected