Jump to content

split form textarea data for multiple posts


fatkatie
 Share

Recommended Posts

Hosting is Godaddy, share.

I have a form textarea that creates a huge amount of data (pasted images via the ckeditor).  A post with that much data
will fail with 413 Request Entity Too Large.  (It works until the data exceeds 1MB)

If these were files, Godaddy can be configured to accept large ones.  This is not a file. (I just wondered if you
can create a file from this and process it that way.)

Has anyone ever split up the data from a text area, sent multiple posts, and then reconstructed
the multiple post outputs (left as files) at the server?  Seems way too complicated to get data to Godaddy.

If there is an example somewhere, I'd like to see it.

Interesting aside.  Godaddy spent a while on this problem until the agent contacted the 'big' guns.
Seems this spec, posting limits, may be guarded information.  Anyway, they wouldn't share it.

 

Thank you.
 

Link to comment
Share on other sites

From a technical perspective it is not a lot of data, but it is still over a million characters! The intent of a text area is for a person to enter text. A million characters does not seem to to be a reasonable amount for a human to enter. Even copy/paste would create some issues (e.g. how would a human verify the content was complete?).

 

I'm not sure what your specific use case is such that this is what you need. The short answer is "Yes" you could implement logic to break up the data and post it separately. But, it would seem to be an overly-complicated solution. You could implement a JavaScript process to to trigger when the user attempts to submit the form to go something like this:

 

  1. Gather the other form fields and submit to the server via AJAX
  2. Save that data to create the initial record(s) and pass back a unique ID in the AJAX response.
  3. The client-side JavaScript upon receiving the success response and the ID could then grab content (x number of characters) from the textarea using a loop.
  4. On each succession of the loop it gets the next x number of characters and submits that to the server along with the unique ID so the server code can append the content to the appropriate field(s) in the record already saved. E.g. UPDATE table_name SET content = CONCAT(content, ]new_content_from_client]) WHERE id = [id_passed_back_from_client]

You would also want to put some sort of "wait" process on the client with an appropriate message to prevent the user from interacting with the page and to warn them from navigating away until the process is complete.

Edited by Psycho
  • Like 1
Link to comment
Share on other sites

Well, after a request for resolution was made in writing, it's definitive, Godaddy restricts a post to 1MB and

will not increase it.  No standard plan they offer, save the dedicated server, will accommodate such posting. 

We will have to change our site/service.  This restriction was only recently applied. 

 

Again, the posting of large files works fine.

 

Thank you.

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.