mirror of
https://github.com/lxsang/ant-http
synced 2025-02-24 00:52:48 +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;
|
totalsize += len;
|
||||||
}
|
}
|
||||||
//remove \r\n at the end
|
//remove \r\n at the end
|
||||||
fseek(fp,-2, SEEK_CUR);
|
fseek(fp, 0, SEEK_SET);
|
||||||
|
//fseek(fp,-2, SEEK_CUR);
|
||||||
totalsize -= 2;
|
totalsize -= 2;
|
||||||
|
ftruncate(fileno(fp),totalsize);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
line = strdup(buf);
|
line = strdup(buf);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user