IdHttp.Get获取文件
- Delphi(Pascal) code
if FileExists('.\Images\' + FilePath + '\' + FileName) then tStream := TFileStream.Create('.\Images\' + FilePath + '\' + FileName,fmOpenWrite) else tStream := TFileStream.Create('.\Images\' + FilePath + '\' + FileName,fmCreate); try IdHttp.Get(URL + FileName,tStream); tStream.Free except tStream.Free ; DeleteFile('.\Images\' + FilePath + '\' + FileName) ; end;不知道啥原因,能够获取到pdf文件及jpg文件,但是在获取dwg后缀的文件就报错。
HTTP/1.1 404 not found
[解决办法]
找不到,确认路径,用其他软件能否下载?
[解决办法]
文件找不到