
Hello! I am trying to include an env. variable, but the execution fails. Do you have any idea what is wrong?
TypeScript
async def process_file(file):
try:
allowed_extensions = os.getenv("ALLOWED_EXTENSIONS", "").split(",")
if not allowed_extensions:
raise ValueError("ALLOWED_EXTENSIONS not set")
if file["type"] == "file" and file["name"].lower().endswith(
(tuple(allowed_extensions))
):
TL;DR
Developers are trying to include an environment variable in their code, however, the execution fails. The problem might be the environment variable not being set. Make sure to set it properly.Recommended threads
- Server Error when Pushing a Function
Get this ambiguous error when trying to push my function, it's TypeScript using NodeJS 18 ``` ? Which functions would you like to push? get-grades (get-grades)...
- Having errors migrating to cloud
Project will not migrate compeltely
- ENV vars not updating
When i do `nano .env` it shows `_APP_DOMAIN_TARGET=` as set to my domain, but when i do `docker compose exec appwrite vars` it shows `_APP_DOMAIN_TARGET=` as ...
