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
- Does a user need to be registered in App...
If I want to send an email (for example, to xyz@gmail.com) from an Appwrite Cloud Function, does that email address need to be registered as a user in Appwrite?...
- endpoint variable
Appwrite Sites passes e.g. APPWRITE_SITE_API_ENDPOINT to the site, but i need this variable in Next.js in my Client-Side-Page. How can i pass it? Next.js only p...
- How can I get the Google Avatar of the u...
How can I get the Google Avatar of the user that signed in with Google?