Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a FileDownload widget #915

Merged
merged 7 commits into from
Mar 12, 2020
Merged

Add a FileDownload widget #915

merged 7 commits into from
Mar 12, 2020

Conversation

philippjfr
Copy link
Member

This adds a FileDownload which makes it possible to download some data which is set on the backend. By default the data is not transferred until a user clicks on a link which will start the transfer, once the data is transferred the widget will provide a link which actually downloads the data. I still want to improve the visual styling as currently it just uses bare text.

@philippjfr philippjfr changed the title Adds a FileDownload widget Add a FileDownload widget Dec 30, 2019
@MarcSkovMadsen
Copy link
Collaborator

I now have a use case for this.

I have some CSV files that are 6MB. Chrome has a limit of 2MB for base64 encoded urls. So I cannot use that workaround.

@maximlt
Copy link
Member

maximlt commented Feb 12, 2020

For sure this will prove to be very useful!
Is it going to work for Office files (.xls, .xlsx, .doc, .docx, etc.)?

@philippjfr
Copy link
Member Author

Is it going to work for Office files (.xls, .xlsx, .doc, .docx, etc.)?

Should work fine yes.

@codecov
Copy link

codecov bot commented Mar 12, 2020

Codecov Report

Merging #915 into master will increase coverage by 0.16%.
The diff coverage is 85.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #915      +/-   ##
==========================================
+ Coverage   87.82%   87.99%   +0.16%     
==========================================
  Files         105      105              
  Lines       12456    12757     +301     
==========================================
+ Hits        10940    11225     +285     
- Misses       1516     1532      +16
Impacted Files Coverage Δ
panel/widgets/__init__.py 100% <100%> (ø) ⬆️
panel/tests/widgets/test_misc.py 96.36% <100%> (+2.42%) ⬆️
panel/tests/widgets/test_base.py 100% <100%> (ø) ⬆️
panel/models/__init__.py 100% <100%> (ø) ⬆️
panel/models/widgets.py 100% <100%> (ø) ⬆️
panel/widgets/misc.py 82.75% <77.27%> (-4.59%) ⬇️
panel/tests/widgets/test_select.py 100% <0%> (ø) ⬆️
panel/widgets/select.py 95.32% <0%> (+1.37%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ffcdd3c...b9cd9e7. Read the comment docs.

@philippjfr philippjfr merged commit 1f1399f into master Mar 12, 2020
@apahl
Copy link

apahl commented Mar 12, 2020

Very cool!

Thanks a lot.

@philippjfr philippjfr deleted the file_download branch March 20, 2020 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Downloadable DataFrame
4 participants