# I can not see the download action progress in the browser

**URL:** https://discuss.tryton.org/t/i-can-not-see-the-download-action-progress-in-the-browser/8305
**Category:** Developer
**Created:** [February 13, 2025, 10:31am UTC](https://discuss.tryton.org/t/i-can-not-see-the-download-action-progress-in-the-browser/8305 "2025-02-13T10:31:22Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mimo\_Alva](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/m/a698b9/32.png) [@mimo\_Alva](https://discuss.tryton.org/u/mimo_Alva)
#### Post date: [February 13, 2025, 10:31am UTC](https://discuss.tryton.org/t/i-can-not-see-the-download-action-progress-in-the-browser/8305/1 "2025-02-13T10:31:22Z")

</div>

**Hi,**

I am working on downloading a ZIP folder. My code is currently capable of downloading the ZIP folder directly to my system’s Downloads folder **silently**. However, I want to see the **download progress in the browser** and have it appear in the browser’s **Downloads section**.

How can I achieve this?

this is my code in `routes.py`

```auto
import os
from trytond.wsgi import app
from trytond.pool import Pool
from werkzeug.wrappers import Response

@app.route('/files_export/download/<int:id>', methods=['GET'])
def download_files_export(id):
    '''
    Tryton web endpoint to serve the ZIP file download.
    '''
    FilesExportStart = Pool().get('account.files.export.start')
    record = FilesExportStart(id)
    zip_path = record.generate_files_and_zip()

    if not os.path.exists(zip_path):
        return Response('ZIP file not found. Please generate it first.', status=404)

    with open(zip_path, 'rb') as f:
        data = f.read()

    response = Response(data, content_type='application/zip')
    response.headers['Content-Disposition'] = f'attachment; filename={os.path.basename(zip_path)}'
    return response

```

and in init ,8 I have called this file like that

```auto

from . import routes

__all__ = ['register', 'routes']

```

But nothing happen, it seems like the function `download_files_export(id)` is not called l.

any help will. be appreciated

---

<div class="post-metadata">

### Author: ![dotbit](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/dotbit/32/2093_2.png) [@dotbit](https://discuss.tryton.org/u/dotbit)
#### Post date: [February 13, 2025, 10:52am UTC](https://discuss.tryton.org/t/i-can-not-see-the-download-action-progress-in-the-browser/8305/2 "2025-02-13T10:52:23Z")

</div>

I think you should add Content-Length header, this way the browser knows how big the total size is.
