콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
4051 화면

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.

아바타
취소
관련 게시물 답글 화면 활동
3
8월 24
2062
2
9월 15
7407
2
7월 25
1516
1
5월 25
982
2
5월 25
1630