Can I link to a file for downloading (other than PDF) in a GitHub wiki?

前端 未结 1 1061
再見小時候
再見小時候 2020-12-19 06:17

When you link to a PDF file using:

[download this](file.pdf)

it downloads the pdf file. I have an excel workbook that I\'d like to allow someone

相关标签:
1条回答
  • 2020-12-19 06:39

    First, try making a files subdirectory in your wiki, and putting your files in there.

    I tried using an html anchor tag

    <a href="files/file.csv" download="file.csv">download this</a>
    

    instead of the markdown link syntax

    [download this](files/file.csv)
    

    but it seems that GitHub wiki strips out the download attribute from the anchor tag.

    In the end, I zipped my spreadsheet in a zip file and had the markdown link point to the zip file.

    [download this](files/file.csv.zip)
    
    0 讨论(0)
提交回复
热议问题