Working download buttons #6

Open
opened 2022-07-05 08:25:07 -04:00 by manfromhuh · 3 comments
Contributor

The download buttons are currently not functional at all in the case of the PDF button or are not really usefull. The MD button will download all articles as article.md.

The download buttons are currently not functional at all in the case of the PDF button or are not really usefull. The MD button will download all articles as `article.md`.
20xd6 added the
bug
enhancement
labels 2022-07-05 09:09:59 -04:00
20xd6 added this to the 1.0 Release milestone 2022-07-05 09:10:03 -04:00
Author
Contributor

DomPDF looks like a promissing option.
It will require passing the generated html form the markdown document but that should be an easy now that that acts as a function.

[DomPDF](https://github.com/dompdf/dompdf) looks like a promissing option. It will require passing the generated html form the markdown document but that should be an easy now that that acts as a function.
Author
Contributor

The <a> tag has a download option now that let's you set the default name of the file being downloaded.

The download link could be changed to:

echo <li><a href=\"article.md\" download=\"".$page_title.".md\" title=\"Download \">MD</a></li>

Referance

The `<a>` tag has a `download` option now that let's you set the default name of the file being downloaded. The download link could be changed to: ```php echo <li><a href=\"article.md\" download=\"".$page_title.".md\" title=\"Download \">MD</a></li> ``` [Referance](https://web.dev/downloading-resources-in-html5-a-download/)
Author
Contributor

This has been tested and isn't working.

Now moving to the solution discribed here.

This has been tested and isn't working. Now moving to the solution discribed [here](https://stackoverflow.com/questions/8875949/how-to-implement-content-disposition-attachment).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: 20xd6/simple_blog#6
No description provided.