diff --git a/src/elogd.c b/src/elogd.c index ace63507..2faf492a 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -27088,6 +27088,8 @@ void show_uploader_json(LOGBOOK *lbs) { for (i = 0; i < attch_count; i++) { sprintf(attchname, "attachment%d", i); + if (!isparam(attchname)) + continue; rsprintf(" {\r\n"); rsprintf(" \"fullName\": \"%s\",\r\n", getparam(attchname)); @@ -27108,7 +27110,6 @@ void show_uploader_json(LOGBOOK *lbs) { rsprintf(" \"contentType\": "); - for (j = 0; filetype[j].ext[0]; j++) if (chkext(filename, filetype[j].ext)) break;