1
我寫的程序,從谷歌下載文件驅動器:RestRequest下載文件德爾福XE7
procedure DownloadfromDriveMyGolden2File;
begin
form2.RESTResponseDataSetAdapter1.AutoUpdate := false;
form2.RESTRequest1.Params.Clear;
form2.RESTRequest1.ClearBody;
form2.RESTRequest1.Method:=rmget;
Form2.RESTClient1.BaseURL:='https://www.googleapis.com/drive/v2/files/{FileId}?alt=media';
form2.RESTRequest1.Resource := '';
form2.RESTRequest1.Params.AddUrlSegment('FileId', form2.Edit4.Text);
try
form2.RESTRequest1.Execute;
except
on e: Exception do
begin
ShowMessage(e.Message);//Show Exception
end;
end;
end;
,但我不能想象在那裏我能趕上TFileStream的或內存流,讓我的文件,是有可能或者我應該使用idhttp做到這一點?