Skip to content

Commit

Permalink
Update Resource.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Feb 26, 2021
1 parent abf22bb commit cca8d5e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Resource.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ import JSON
DownloadButton(JSON.json(Dict("name" => "merlijn", "can_cook" => true)), "staff.json")
```
If you want to make a **local file** available for download, you need to `read` the file's data:
```julia
let
filename = "/Users/fonsi/Documents/mydata.csv"
DownloadButton(read(filename), basename(filename))
end
```
"""
struct DownloadButton
data
Expand Down

0 comments on commit cca8d5e

Please sign in to comment.