Hi all,

In my web application I load data from MySQL database into an iframe. Sometimes files bigger than 1 Mb.

I make some changes on the file, and afterwards I send it back to the database.

The issue is that with this code below I can't send files bigger than about 1 Mb, and also the longer the files the slow it becomes:

var params = "version="+version+"&work="+actualWork+"&secName="+secName+"&text="+text;
xmlHttp.open("POST",url,true);

xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded;charset=UTF-8");
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.send(params);

Could you help me on this?

Recommended Answers

All 6 Replies

I'm guessing this is an Ajax request. Try sending the contents over to the server with out using Ajax and see if that works

How can I do it without AJAX?

are you using JSP/Servlet for your serverside?

if you are inserting data(e.g)image into database,i recommend you to use BLOB datatype.

try the following link
<URL SNIPPED>

@vtm
1. You provided bad link that was going to some question about upload with no answer
2. Roseindia is bad practices "heaven", which mean it is unwelcome hell for any programmer

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.