Hi,
I want a button for download a file in my server. Odoo 14 server and file to download are same server. For example my file is in " /home/web/web.pdf " on website when I press the button I want to download web.pdf.
How can I link it?
many thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
I want a button for download a file in my server. Odoo 14 server and file to download are same server. For example my file is in " /home/web/web.pdf " on website when I press the button I want to download web.pdf.
How can I link it?
many thanks
To keep it simple, you can link your buttons to filehosting/filesharing platforms (Nextcloud, Drive, ...) where you host your files and share them for download.
BR
Ricardo
You need to write a controller to return the download response. You can refer to this function in Odoo for downloading PDF reports.
@http.route(['/report/download'], type='http', auth="user")
def report_download(self, data, token, context=None):
In your case, you have to browse the file and return the download response.
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
3
thg 8 24
|
1859 | ||
|
2
thg 9 15
|
7307 | ||
|
2
thg 7 25
|
1320 | ||
|
1
thg 5 25
|
832 | ||
|
2
thg 5 25
|
1451 |