Ability to reference external files directly or import folders to design root

I'm not 100% sure if we're talking about the same thing @Buddhabeker, but you have good points there too. What I'm talking about is just the ability to reference basic files in a directory on my computer as if it were in BSS or as if it were showing a full URL and the files were uploaded to the server. I think what you're asking for is the ability to use "includes" and that's not the same. I just want to add files to a folder on my computer that I have that client's project files set up in. Then I want to be able to tell BSS that this project location is part of the site and have it automatically see all the files in that project location so I don't have to upload them and reference them by absolute URL's.

I would also like to be able to set file types so that it will know which ones I want to use and not use as well as block specific folders from being used.

The major issue that this is causing me right now is that I have over 40 CSS files that need to be detected as imports (BSS wouldn't even let me make a CSS file with the imports in it, I had to make it as an SCSS file. The builder of this tabbed component that I'm trying to use has it as a CSS file, not a SCSS file so I don't even know if I can use this at all.

I really do get tired of having to create work arounds for the lack of access for things like this and locked items and such that cause issues trying to recreate things. Right now I'm trying to "recreate" this tabbed component so I can use it in my site without using Custom Code. But these limitations are keeping me from not only recreating it, but using it at all.

So, if I could put all these CSS files into the appropriate location in my project folder for this site, and if BSS could be told that this project location is part of the files for my BSS project, that would solve a whole lot of issues with recreating things, using custom fonts, custom files, pretty much anything you can't import properly in BSS.

Just thought I’d give this a bump since it’s been almost 3 years since it was posted so we can find out if this is anything even planned or not or if so, get some kind of time frame on it. This would save us so much hassle and time.

+1 Agreed. I have work-arounds in place, but it would be considerably easier if we could do what the title of this post says.

Importing arbitrary file types and folders to the design root is not something that will find its way to Bootstrap Studio. This means potentially multi gigabyte bsdesign files which will slow everything down.

Linking local files or directories without importing them is possible, but this creates issues with Bootstrap Studio Sites - should we upload the entire local folder when publishing? Also if your external folder contains CSS or JS files, I guess users would want to edit them too. So the app should now also serve as a general purpose code editor which brings yet more complexity.

The current solution is to just upload the files to a regular hosting provider/file storage service and link them in your design. I think it works well and is simple to understand. If there are cases where this doesn’t work, we would love to hear them.

I think adding a setting where one can choose a linked local folder when a new site is created makes the most sense. I don’t think it needs to be too complicated. There’s no reason why someone would need to put CSS or JS files in it, since they’re already importable, but perhaps there could be some sort of pre-defined list of supported file formats that the linked folder could contain… .pdf, .docx, .xls, .txt, .ogg, .mp3, HTML5 video formats, .htaccess, .zip, etc…

Anything not supported would be ignored during upload, or better still, if the files could be added to the folder through an dialogue in the program, then the program could simply list the supported file types, and not allow anything to be added that isn’t supported. I suppose there could even be a size limit, although that might be problematic with videos. I would mainly use it for PDF files, which my clients use in abundance on their websites.

@Martin, I think you are misunderstanding the request. All we really want to be able to do is “see” the local files so we can link them using relative links. No need to edit when the site is done then to reset sometimes hundreds of absolute URLs that no longer need to be “absolute”. I don’t need to edit the files in BSS I have external editors galore for that. Just need to read them, nothing more. Doesn’t have to be a complicated mess with editing and uploading etc.

The upload would remain the same as I’m assuming that people using BSS Sites can upload outside of the app? If not then no matter either way since they can’t use anything external. If so then that’s all that matters. I don’t mind uploading the stuff separately etc. Just would like to be able to reference it in the projects to be able to use relative links and see the content rather than blank placeholder stuff, and not use Absolute links and then have to change them all later.

1 Like

Each website I build is saved in a dedicated folder on my computer. Inside that folder is where I save the .bsdesign file, and then there are a few dedicated subfolders with some of media items I have on the website… images, videos, PDF files, any custom CSS or JS I might use, as well as the export folder, etc…

When you import an image into the program, the program no longer looks for the image on the computer because it’s now saved as part of the .bsdesign file.

If there was a way that the program could be “made aware” of a folder on my computer so that when I preview my page in my local browser and say, click a button that is linked to a PDF file, I don’t get an error page saying “this asset cannot be found”, but rather, the PDF file is opened.

I think this is what @jo-r means.

That is exactly what I mean. I don’t need to edit the files, I just need the app to locate them per project. Granted I don’t keep all of my files in one basket, but just the ability to point to a project folder that could read the locations for PDF’s, zip files, anything that cannot be imported basically, and that it would be able to read multiple directories deep so we can use relative links to these items and as PN already pointed out, they would work in preview mode for true testing. The way it sits now I can only test 3/4 of my sites and then have to go back and test a bunch more after uploading. Not a very practical way of doing things.

I would like to +1 this idea. I am currently working with an animation in Hype 4 that has a video, and I cannot reference the export folder from Hype, but have to complete designs in Visual Studio Code.

  • I can add the relevant items to the head
  • The animation plays
  • The video will not play because of how it is referenced in script and there is no workaround unfortunately

@martin I think a symbolic link could work.

With the new uploading setup I think this would be a great addition now. We can upload our external files to our servers, and have a copy on our local drive for BSS to see.

Even if it was set up something like we do with Sass: Reference specific folders only (this way it won’t mess with other folders we may have in the main project folder that we don’t want included.

Then the app just “sees” the content and utilizes it with any references within our HTML or CSS/SCSS that is needed.

This is all basically to arrive at one result. The ability to view, and/or reference relatively, items in BSS that are referenced externally such as videos, PDF’s (just for linking relative), scripts we may need to run for galleries, cms, etc.

Just for referencing and visually seeing the results in BSS if possible. Not editing in any way.

@apowell656

In Hype 4

Create a regular rectangle, and select Edit > Edit Inner HTML.
Give the rectangle a unique ID, in this example hype_video

HTML

<video height="100%" width="100%" controls="">
  <source src="" type="video/mp4">
</video>

In your javascript file in Hype 4 add this

Javascript

const hype_video = hypeDocument.getElementById('hype_video').querySelector("video");
hype_video.setAttribute('src', "https://YOUR-DOMAIN/YOUR-MEDIA-FOLDER/YOUR-VIDEO.mp4");
hype_video.play()

now your video will play

Thanks for that @kuligaposten , but that does only help the smaller issue of visuals. The referencing using relative URL’s is the more immediate issue for me. Having to link to online things to make sure all looks right and works right and then going back to redo all the links to be relative (I prefer relative links when possible) is the bigger issue for this. Yes visuals are also important, but as you show there are work arounds for that. There are no real work arounds for the relative links though. :frowning:

Yep, @kuligaposten I went back to their forums and found this - Custom Video Embedding: Youtube, Vimeo, or hosted video files | Stopping Audio when exiting the scene - Audio & Video - Tumult Forums so ou are spot on! It is not ideal, but I understand why (BSS hosted sites) why this is currently not available.

Other than that I see the use case @jo-r and others have mentioned. I don’t have a solve for this, but the use cases are valid.

Hi.
Returning to the initial idea of ​​the thread, i comment the following: i think it would be ideal to have a “files” or “myfiles” type folder, created by each design, where pdf, wav, mp3, mp4, etc. files can be uploaded. …if the file is greater than “X” size (which could be set in settings) then it should not be imported, in this way we could refer to the imported “pdf” files.

Thanks

I solved the problem, but I have gratefully had two projects sneak into my life and just wanted to say to the dev team - BSS has saved me again.

Hopefully I will be able to get back to my original slate of projects for 2022 (one of them being BSS to Django@fruitfulapproach I haven’t forgotten about this one).

1 Like

@apowell656

I am just now getting back into webdev. I want to make a jobs portal website (already found the django template on github for that). Now I have to convert it to use BSS :slight_smile:

@apowell656 would you like to alpha test and give me feedback on the template generator fork? I have Win 10 now on dual monitors and have installed BSS. I think everything has to appear in an app folder like Pages/accounts, Images/accounts in the BSS folder structure. I think that’s currently why it’s not writing to the Django project anything. Everything has to be just right for it to work, so we might want to Zoom one another.

I will give it a shot this week and let you know about the experience.

1 Like

Guys can you start a new thread with your Scripting posts as it is off topic of this thread please and thanks! :slight_smile:

2 Likes

@jo-r not a problem.