From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.42.47.5 with SMTP id m5mr29470621icf.26.1427278736479; Wed, 25 Mar 2015 03:18:56 -0700 (PDT) X-Received: by 10.182.250.200 with SMTP id ze8mr78893obc.3.1427278736465; Wed, 25 Mar 2015 03:18:56 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.glorb.com!z20no4706129igj.0!news-out.google.com!qk8ni67122igc.0!nntp.google.com!z20no3088497igj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 25 Mar 2015 03:18:56 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=213.175.37.10; posting-account=gOWpSgoAAADVGkXEvWuE0ZkuZ-N4vbqK NNTP-Posting-Host: 213.175.37.10 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <32becb99-faaa-41b8-a0ef-aa76bc3fe716@googlegroups.com> Subject: Downloading of large file with AWS From: landgraf Injection-Date: Wed, 25 Mar 2015 10:18:56 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:25248 Date: 2015-03-25T03:18:56-07:00 List-Id: I'm looking for a way how to download file using GET request and monitor the progress. The problem is length of the file can be obtained by separate request only (browser/wget don't know length of the file because of this). I'm pretty sure I did this last year but lost the code. The process looked like: procedure Download (URL : String; Length : Natural, Connection : in out AWS.Client.HTTP_Connection) is buffer : Stream_Element_Array (1 .. Size); Last : Stream_Element_Offset; Left : Natural; -- task to monitor the progress omitted begin loop -- Procedure to start the process ?? exit when Left = 0; AWS.Client.Forgotten_Procedure_to_Read_Chunk (Connection, Buffer, Last); -- !! I forgot how to do it. Probably it can be done with AWS.Client.Read(_Some) but no success so far Left := Left - Natural (Last); -- append buffer to file end loop; end Download; Any AWS experts (Pascal?) here?