Hi Guys
Hi Guys,
Someone know a example about use a progressbar while downloading files using AmazonAPI ? I know a way using IDHTTP, but AmazonApi use another class to do it.
Regards,
Cleidson.
Someone know a example about use a progressbar while downloading files using AmazonAPI ? I know a way using IDHTTP, but AmazonApi use another class to do it.
Regards,
Cleidson.
Didn't Marco publish something about Amazon APIs quite some time ago? It was a few years before he got appointed. I remember it clearly but I can't remember the details. Worth checking though.
ReplyDeletehttp://blog.marcocantu.com/blog/delphi_rest_client_repository_opening.html
ReplyDeleteHi Andrea. The download and upload arent a mistake. The problem is how to show the download progress. I dont know a way to do it. Its very usefull when downloading big files.
ReplyDeleteA 2 years ago, this article from Cantu was my first help to work with Amazon S3 Cloud.
ReplyDeleteAs I said, I didn't remember the details :) I have never used it, but I remembered I'd seen something about it.
ReplyDeleteIf you are actively using it, why not contributing to it by adding this yourself?
Also, I would check to see whether any updates have been made - probably someone had the same need and proposed a change.
I have had a look at the code for you and the component is using Indy internally. So what I would do is simply surface the progress event of the Indy Component to the outside world.
ReplyDeleteI think this should work.
A
Hi Cleidson,
ReplyDeleteis simple, you can use three methods of TidHttp class : onWorkBegin, onWorkEnd, onWork
with this methos you can set your progress max value in onWorkBegin:
procedure TForm4.IdHTTP1WorkBegin(ASender: TObject; AWorkMode: TWorkMode;
AWorkCountMax: Int64);
begin
my_progress.min :=0;
my_progress.max := AWorkCountMax;
end;
with onWork
procedure TForm4.IdHTTP1Work(ASender: TObject; AWorkMode: TWorkMode;
AWorkCount: Int64);
begin
my_progress.position := AWorkCount;
my_progress.refresh;
end;
procedure TForm4.IdHTTP1WorkEnd(ASender: TObject; AWorkMode: TWorkMode);
begin
my_progress.position := my_progress.max;
end;
Qual classe amazonApi usa ?
ReplyDeleteHi Ivan Revelli and Alan Patric . Using idhttp is simple to show the progress, but I m using the class TAmazonStorageService.GetObject and this class, use an IIPHTTP.doget method to obtain the stream.
ReplyDeleteCleidson Barbosa , você conseguiu resolver o progressbar do Delphi usando TAmazonStorageService.GetObject? Estou com essa mesma dúvida.. consigo fazer o upload e o download dos objetos na Amazon S3 mas gostaria de exibir o percentual do download realizado... valeu!
ReplyDelete