Forum Discussion
DonTino
22 days agoCommunity Member
Code Block and File Download
So i create a lot of custom blocks via the HTML block and it works very good until i want to include a handout in my HTML code.
<a href="assets/filename.pdf" class="download-btn" download target=...
- 9 days ago
Hi DonTino
You won't be able to access local files nor create files from within a custom code block in RISE. The code runs in a RISE 'sandboxed' environment - but the browser wouldn't allow you to do it anyway as your request would violate the CORS browser security rules.
You could try loading the pdf as a 'File Attachment' in RISE then capturing the url of the uploaded pdf file and using that in your code. You are then accessing a file which is already on the RISE server.
DonTino
5 days agoCommunity Member
Thanks, that worked!
Related Content
- 3 months ago
- 5 months ago
- 10 months ago
- 2 months ago
- 2 months ago