Variable Source Path
See original GitHub issueHi, is there a way to include the video source path as a variable? Hoping to be able to load most of the path in my config and then pull the filename from other data in my component.
So instead of:
<b-embed type="video" controls>
<source src="../../../../path/to/myproject/filename.mp4" type="video/mp4" />
</b-embed>
I’d like to be able to do:
config.json:
"pathToOutputMedia": "../../../../path/to/myproject/",
vuePage.vue:
<b-embed type="video" controls>
<source src="assetPath" />
</b-embed>
<script>
var assetPath = config.pathToOutputMedia + "filename.mp4";
</script>
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Adding a Path to the Linux PATH Variable | Baeldung on Linux
The PATH variable is an environment variable containing an ordered list of paths that Linux will search for executables when running a command....
Read more >How to set your $PATH variable in Linux - Opensource.com
Explore how the principles behind open source--collaboration, ... Simply add /place/with/the/file to the $PATH variable with the following command:
Read more >How To View and Update the Linux PATH Environment Variable
The PATH variable contains a list of directories the system checks ... To apply the changes to the current session, use the source...
Read more >Path variables | IntelliJ IDEA Documentation - JetBrains
Use path variables to define absolute paths to resources that are not part of a specific project. These external resources may be located...
Read more >What are PATH and other environment variables, and how ...
A: The PATH variable sets directory paths to look in when commands are executed, both for RUN commands, and for internal calls from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Depending on your loader configs, prefixing path strings with
~
or@
(aliases) can reference different locations within your project structure…You can also use
:src="require(somePath)"
in certain situations.https://stackoverflow.com/questions/37671342/how-to-load-image-files-with-webpack-file-loader
That is because web server will only serve documents/files that fall under the root path of the server (for security reasons) The root of your URL is
http://localhost:8081/
, so no matter how many../
you prepend you can never get above that.Imagine someone attempting to do this:
or similar to extract password files off of a server.