jmckirdy / Codex-Arcanum

The Mad Wizard's Coding Notes
GNU General Public License v3.0
1 stars 0 forks source link

Sending / Receiving data via 'choose file' button #12

Closed jmckirdy closed 3 months ago

jmckirdy commented 3 months ago

fix: 'choose file' button handles sending data (pdfs currently, later, docx, rtf, xml, html) to server via POST (currently), the server stores these 1-7M files as large BLOB types. then it needs a decent amount of PHP code to parse/then echo the data onto the page. Just get the files from the server echoed/formatted make sure it all works. Might have to adjust my.ini:max_packet_size vari, OR php.ini: post_max_size, upload_max_filesize.

jmckirdy commented 3 months ago

uploads all data now via form, make note of (lines:18,19 addcodex), that's the part that reads and sanitizes file since it's different with big files and $_FILES Global ass. array. The previous way of addslashes(htmlspecialchars()) is for $_POST not $_FILES