Creating manual links to local files


How do we manually link to files and media assets in Blocs?

I have files being referenced from javascript and css but I can’t figure out the directory structure so things work in the preview. I figure once I export the site I can link up the files no problem but I’d like to get things working in the preview as well.

Thanks in advance.


I don’t think you can preview it via in-app preview at this moment, if you export the project and open it in web browser you can see the results. @Norm, mentioned that he is revamping the in-app preview for the future releases so soon you should be able to view those results inside Blocsapp.


Thanks @ilayd for the info. I’ll open a Wish List thread and see how that goes.


If you just want a download button to a file, you can add either zip or pdf files to your assets & then drag the asset into the edit view, which will create an automatic download button and over in the sidebar, the file name will be shown in the interactions > type download & the file in the dropdown.



Thanks @Bill, I’m okay with being patient, knowing this has been discussed. Any updates or thoughts on this @Norm ?

Also, That is helpful to know, but not really the use case I’m most concerned about. Adding things like sprites and background images via javascript and/or css is commonplace. I’m really surprised more developers haven’t mentioned this need.

As I’m writing this I’m realizing that the Class Manager is the fill-gap currently for adding images to your css that you can preview. But since the UI doesn’t reveal all the css options (of course), and there’s no equivalent to the Class Manager for Javascript, or other file formats.

I do think it’s best if we have complete freedom to write and test our own CSS. I’ll use a CDN for now so I have working urls in my code, allowing me to test things. I did run into a CORS issue today so I must use a local image in my code. Besides hand-writing code is faster :wink: