I uploaded a pdf file as an asset.
I want to link to it from a text component. How do I do that?
When I open the asset through the resources drawer the pdf has a very long number/letter name. Is this just in the preview?
Thank you!
Sandra
I uploaded a pdf file as an asset.
I want to link to it from a text component. How do I do that?
When I open the asset through the resources drawer the pdf has a very long number/letter name. Is this just in the preview?
Thank you!
Sandra
Yes the file is renamed when you upload it so you will need to use this renamed filename
Here is how I would create a hyperlink to such a document:
You can get the link to your pdf by adding it to the resources and then it gives you a link something along the lines of
course/assets/90bd6c356cb0fa3f3b217c97b542ec09e58a6594.pdf
You can then create a hyperlink to it by entering something like the following via the WYSIWYG and selecting "Source" mode
<p><a href="./course/en/assets/90bd6c356cb0fa3f3b217c97b542ec09e58a6594.pdf" target="_blank">Link</a></p>
Note I had added ./ in front of the link
Note also I have added target="_blank" to ensure it opens in a new tab/window
The word "Link" is my hyperlink - you can change this to anything you wish
I just wrote a separate post about hyperlinks that may be helpful too.
Thanks Paul, I'll try that!
It's just a bit inconvenient that people can't download the file with the proper name.
I think it would probably be possible to manually put the pdf files in a folder within the course and link them with your proper file names but tI haven't tested this theory.
Yes, you could absolutely do this - would need to be done each time you publish of course.
Sandra I think your point is very valid, I can easily foresee a situation where you would want the learner to be able to download a file with a specific filename and the AT should not get in the way of you being able to do that.
Hi guys, just wondering if there was any fix to this?
I see when you add an asset to the "Resources" section, you can specify a name for the file when downloaded, which is great, but there appears to be no way to do this if you are using a text link within a text block.
There really should be an option to keep the correct naming of uploaded files - we require original file names and this just seems like an obvious thing.
I tried manually uploading a file to the "assets" folder and then linking to it, but it just came up as a dead link - where exactly should we be manually placing a file so we can download with the correct file name?
Thanks for any help on this.
but there appears to be no way to do this if you are using a text link within a text block
Add a download
attribute to the link. That's how the resources plugin does it.