mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Added error when non-existing attachments get submitted
SVN revision: 1088
This commit is contained in:
parent
414639f7fc
commit
3d751c569e
11
src/elogd.c
11
src/elogd.c
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.481 2004/09/23 22:06:31 midas
|
||||||
|
Added error when non-existing attachments get submitted
|
||||||
|
|
||||||
Revision 1.480 2004/09/22 19:20:57 midas
|
Revision 1.480 2004/09/22 19:20:57 midas
|
||||||
Fixed superfluous spaces
|
Fixed superfluous spaces
|
||||||
|
|
||||||
@ -19262,6 +19265,14 @@ void decode_post(LOGBOOK * lbs, char *string, char *boundary, int length)
|
|||||||
} else
|
} else
|
||||||
ptmp += strlen(ptmp);
|
ptmp += strlen(ptmp);
|
||||||
} while (TRUE);
|
} while (TRUE);
|
||||||
|
|
||||||
|
/* check attachment size */
|
||||||
|
if ((int) (p - string) == 0) {
|
||||||
|
sprintf(str, loc("Attachment file <b>\"%s\"</b> empty or not found"), file_name);
|
||||||
|
show_error(str);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* save attachment */
|
/* save attachment */
|
||||||
if (file_name[0]) {
|
if (file_name[0]) {
|
||||||
el_submit_attachment(lbs, file_name, string, (int) (p - string), full_name);
|
el_submit_attachment(lbs, file_name, string, (int) (p - string), full_name);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user