cgi_filehandle(3)
π cgi_filehandle(3) π
okay bestie, welcome to the ClearSilver corner of the manual pages π this one lives in section 3 and it's filed under cgi/cgi.h, so if you're the kind of girl who reads headers for fun (me, obviously π
), you already know the vibe.
β¨ NAME β¨
cgi_filehandle β hand you a file pointer to an uploaded file ποΈβ¨
πΈ SYNOPSIS πΈ
#include <cgi/cgi.h>
FILE *cgi_filehandle (CGI *cgi, const char *form_name);
that's it, that's the whole signature, no cap π«Ά
π¦ ARGUMENTS π¦
cgiβ a pointer to aCGIstruct that you allocated withcgi_init. it's giving "you gotta bring your own CGI object" energy πform_nameβ the form name that the file was uploaded as. and listen, queen, this is not the filename, okay? that's a whole different thing and the manpage is being very clear about it, so pay attention π«‘ (and if it'sNULL, we're asking for the file handle for thePUTupload β yes ma'am, that's the special case π)
π DESCRIPTION π
so cgi_filehandle will return the stdio FILE pointer associated with a file that was uploaded using multipart/form-data πβ¨
and the cute part: that FILE pointer is positioned at the start of the file when it's first available. so you're not gonna be like, mid-file wondering where you are β you start at the beginning, iconic behaviour honestly π
π RETURN VALUE π
None
...yes. literally None. that's what it says. the docs said what they said and I'm just the messenger π the function hands you a FILE * in the synopsis and then the RETURN VALUE section goes "None" β we don't question the ancients, we just cite them π―οΈ
π SEE ALSO π
like, the entire friend group is here, fr fr πΈ:
cgi_debug_init(3), cgi_parse(3), cgi_destroy(3), cgi_js_escape(3), cgi_html_escape_strfunc(3), cgi_register_strfuncs(3), cgi_output(3), parse_rfc2388(3), cgi_url_validate(3), open_upload(3), cgi_cs_init(3), cgi_url_escape_more(3), cgi_html_strip_strfunc(3), cgi_neo_error(3), cgi_redirect(3), cgi_filehandle(3), cgi_register_parse_cb(3), cgi_url_escape(3), cgi_init(3), cgi_redirect_uri(3), cgi_cookie_clear(3), cgi_url_unescape(3), cgi_vredirect(3), cgi_display(3), cgi_html_ws_strip(3), cgi_error(3), cgi_cookie_set(3), cgi_text_html_strfunc(3), cgi_cookie_authority
(yes bestie, cgi_filehandle(3) is in its own SEE ALSO list. self-love, we stan π
β¨)
and that's the whole page, gorgeous π«Ά this one came from ClearSilver, dated 12 July 2007 β an absolute vintage era, and honestly the fact that a 2007 manpage is still out here serving is main character energy in itself ππ go upload something cute β¨
π¦ where this page comes from
- debian bookworm: clearsilver-dev 0.10.5-4+b5
- debian trixie: clearsilver-dev 0.10.5-6+b1
- epel 10: clearsilver 0.10.5-80.el10_2 Β· Apache-1.1
- epel 9: clearsilver 0.10.5-74.el9 Β· Apache-1.1
- fedora 43: clearsilver 0.10.5-80.fc43 Β· Apache-1.1
- fedora 44: clearsilver 0.10.5-82.fc44 Β· Apache-1.1
- ubuntu jammy: clearsilver-dev 0.10.5-4build3
- ubuntu noble: clearsilver-dev 0.10.5-4build7
- ubuntu questing: clearsilver-dev 0.10.5-6build1
- ubuntu resolute: clearsilver-dev 0.10.5-7
- ubuntu stonking: clearsilver-dev 0.10.5-7build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms