Closed bendesilva closed 4 years ago
So typically you actually want to use aliases for anything that is a path or a URL:
https://nystudio107.com/blog/multi-environment-configuration-for-craft-cms-3#aliases-in-craft-cms
...but I can make this work for you.
@khalwat Funnily enough I read your article on this earlier today and spotted the section on aliases. I wasn't aware that the aliases could be overwritten or custom aliases could be defined, so I'll be using this approach going forward. It still may be useful to support environment variables in case someone were to trip up on this in future.
If your asset volume "file system path" is set to an environment variable, transcoder's
getAssetPath
function will return an error with the message "the input value is not a valid URL". If the "file system path" is changed to use the @webroot alias or an absolute path, all functions work as expected and thumbnails will be produced and videos transcoded.I prefer to use environment variables where possible, however I've had to change a website I'm working on to use @webroot for the time being to enable Transcoder to work.