-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misleading comments about max. size of form data #139
Comments
@tillkamppeter OK, I think the original code (from mOAuth) allows up to 2MiB but when I moved it here I reduced the limit. Will make sure everything is consistent between them. Do you need support for files larger than 64k? |
I use this functionality for the user to add PPD files to the PostScript Printer Application, so that he can use it with printers which are not supported by the built-in PPDs, for example if the printer's PPD is under a non-free license. As papplClientGetForm() does not allow upload of multiple files with a single widget I have done my own replacement in the PostScript Printer Application. It uses a 32 kB buffer and fills it, parses the content, fills it again , ... until passed through all data, so I am somehow streaming the data. This allows even uploading files of several GB (like a Ubuntu Desktop ISO) and this even with your papplClientHTMLStartForm() function which sets MAX_FILE_SIZE to 64 kB. There can be also other types of files to be uploaded into a Printer Application which are bigger than 64 kb: Firmware files, color profiles, or even printing via web interface. |
See the ps_system_web_add_ppd() function in this commit. |
The function papplClientHTMLStartForm() tells in acomment that the maximum attachment file size is 1 MB, but MAX_FILE_SIZE is set to 64 kB.
papplClientGetForm() tells in a comment that it reads up to 2 MB but uses a buffer of only 64 kB, filling up this buffer once and parsing only this data. It would need to use a 2 MB buffer or fill the 64 kB several times.
The text was updated successfully, but these errors were encountered: