1
0
mirror of https://github.com/lxsang/ant-http synced 2024-07-01 12:59:47 +02:00

fix upload file problem

This commit is contained in:
Xuan Sang LE 2018-10-01 18:42:01 +02:00
parent 2fb9b5b9d4
commit a328aa4af9

View File

@ -834,8 +834,10 @@ void decode_multi_part_request(void* client,const char* ctype, dictionary dic)
totalsize += len;
}
//remove \r\n at the end
fseek(fp,-2, SEEK_CUR);
fseek(fp, 0, SEEK_SET);
//fseek(fp,-2, SEEK_CUR);
totalsize -= 2;
ftruncate(fileno(fp),totalsize);
fclose(fp);
line = strdup(buf);