mirror of
https://github.com/lxsang/ant-http
synced 2024-11-17 17:08:20 +01:00
fix upload file problem
This commit is contained in:
parent
2fb9b5b9d4
commit
a328aa4af9
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user