The user is able to upload an image which will have a massive amount of image data. This image data is going to be stored temporarily on the browser in the textbox. Once the user submits the form to the PHP server using POST, I'm going to add the contents of that textbox to a blob in the database.
My question: Is there a maximum limit to the amount of characters an HTML textbox can take?
I read online somewhere that I won't be able to POST this textbox to the server (with PHP).
There are limits on client computer (limits of virtual memory) and there can be and usually is a limit on server-side of how many bytes can be received. POST limit size on Apache can be viewed and changed like answered in this question.
The preferred way of sending file is using multipart/form-data
and convert it to blob there in server before storing in DB.
As of i know, we can store any amount of data in the input type text. There is no limit on the browser side. With POST, there is no technical limit in the browser, but usually one on the server side - see e.g. Apache's LimitRequestBody
, PHP's post_max_size
and so on.
MAXLENGTH
The maximum number of characters that will be accepted as input. This can be greater that specified by SIZE , in which case the field will scroll appropriately. The default is unlimited.