Skip to content

Commit f619c5f

Browse files
Fix: Allow download of script output with "shell" type in .txt format
JIRA: https://telecominfraproject.atlassian.net/browse/WIFI-14937 Summary of changes: - Modified FileUploader to accept both "application/octet-stream" and "text/plain" as valid content types. - This ensures the controller correctly processes files uploaded by APs when executing shell-type script commands, allowing successful download in `.txt` format. Signed-off-by: Taruna Chaudhary <taruna.chaudhary@routerarchitects.com>
1 parent 242261d commit f619c5f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/FileUploader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ namespace OpenWifi {
217217
Reader.nextPart(Hdr);
218218

219219
const auto PartContentType = Hdr.get("Content-Type", "");
220-
if (PartContentType == "application/octet-stream") {
220+
if (PartContentType == "application/octet-stream" || PartContentType == "text/plain") {
221221
std::stringstream FileContent;
222222
Poco::StreamCopier::copyStream(Reader.stream(), FileContent);
223223
Answer.set("filename", UUID_);
@@ -315,4 +315,4 @@ namespace OpenWifi {
315315
poco_notice(Logger(), "Stopped...");
316316
}
317317

318-
} // namespace OpenWifi
318+
} // namespace OpenWifi

0 commit comments

Comments
 (0)