How to upload file to server, using GSM shield

Hi,

I need to load a txt file on my server using GSM shield. I tried to make an HTTP request (POST) with the class GSMClient. But it doesn't work. The code is like this:

client.println("POST File/Post HTTP/1.1");
client.println("Host: myserver.com");
client.println("Content-Type: multipart/form-data, boundary=xxxBOUNDARYxxx");
client.println("xxxBOUNDARYxxx");
client.println('Content-Disposition: form-data; name="file"; filename="dataY.txt"');
while(dataFile.available())
    {
      char c=dataFile.read();
      client.write(c);
      Serial.write(c);//for debug
    }
client.println("xxxBOUNDARYxxx--");

I do not understand where I'm wrong.

Help Me!!!

Thanks!