Help with loading images from image id in a table and image sitting in the Files
I'm making a next.js/react app using typescript.
I have a query to get every level:
```ts
import { v } from "convex/values";...
Stuck at "Parsing uploaded data"
I'm trying to import a small .jsonl file like the docs say, however I get stuck at "Parsing uploaded data" forever. The data is ok and it should pass schema validation. I originally tried with a .csv but no luck so I switched to jsonl but the result is the same.
I'm using mac with vscode and I've been able to import the data before, but no luck now whatsoever.
Any help? Thanks!...
How can i check if I'm on production or on development?
I think you need to define variables in convex variables and you cannot use ones from .env file. But how can i define them in convex so that I get development when i run this on localhost and production when it's a deployed version?
usePreloadQuery - undefined is not an Object (evaluating 'preloadQuery._argsJSON')
I'm trying to server-render using Remix via
preloadQuery
.
From the log, I can see NEXT_PUBLIC_CONVEX_URL
and CONVEX_URL
have values, but i'm getting this error.
I'm deploying to fly.io
...Server show signed in & refreshed token, yet, <Unauthenticated> is triggered
What am I missing here? I'm just trying to use Email/Password Signup & Register. Nothing else. Not using OAuth.
Been working fine for months with Clerk. I am trying to migrate to Convex Auth. The project is huge so i did screen shots and compressed the user functions (partial) and user schema into a single TS file. The server is configured, tables, env, keys.
It looks like its working but there is some disconnected with the Provider/Context?...
Schedule function
hello there
I need to execute a specific task every minute on creation (api.some_task.create), but only for a duration of 10 minutes. Could someone please guide me on how to schedule this function?...
Did you mean 'typeof ConvexProvider'?
Example straight outta of next.js quickstart has the ConvexProvider component throwing this TS error.
"'ConvexProvider' refers to a value, but is being used as a type here. Did you mean 'typeof ConvexProvider'?ts(2749)"
`"use client";
...
Recommended way to mock functions of actions, and the "2 dot hack"
Hi! I Couldn't find a recipe or example of how to mock convex actions, for cases where an action depends on external services.
Initially, I tried to mock actions directly, but realized that it might be an anti-pattern since the responsibility of an action (from what I understand), is to combine the DB with external services (called via fetch or external function), and we should only mock the external part.
So I tried to mock functions with the vitest setup, but the files containing mocks are considered for production deployment (
__mocks__/mock-name.js
is not a valid path to a Convex module)....immutable schema field
I guess the only way to do this atm is with a db writer wrapper? Would be a pretty useful helper imo!
By marking a field as immutable, once it’s value is set it cannot be changed just to be clear...
Feature request: Account switching in CLI
Earlier this morning I found a thread where @lee was helping someone with a login-switching problem, and I'm glad I did. I've got both personal and work accounts on Convex, and it looks like I'll be using the solution that Lee shared (forcing the login:
npx convex login --force
) a lot as I'll be switching between these accounts very frequently on the same system, possibly multiple times a day.
Would it be possible to update the CLI tool to a) allow more than one authorized login on the same system, and b) add a login switching feature? Maybe something like npx convex login --switch
to bring up a prompt showing all available options, or npx convex login --use [nickname]
to immediately change. I feel this could be a really useful feature for many users....Getting Url for a file in convex
When I try to send a request, it writes an error 404 Not found, I tried to find the answer in the documentation and the problem is that the file id that we have does not work to receive the link
``ts
function getFileUrl(fileId: Id<"_storage">): string{
return
${process.env.NEXT_PUBLIC_CONVEX_URL}/getImage?storageId=${fileId}`...Convex Ents Cascading Delete not working
```import { defineEnt } from "convex-ents";
import { v } from "convex/values";
export const collectionsSchema = defineEnt({
name: v.string(),...
Convex Ents and Convex authTables TS error
Hi, I want all my schema to use Convex Ents. But the authTables from @convex-dev/auth/server seems to be not compatible with Convex Ents. As I am getting typescript error if I add these tables. Can anyone help or guide me in the right direction?
file storage: how to make the files private and secure
Hi accessing the file via the url is public as long as you get the link. How to make them readable only from my app with user authentication check based on my URL? Also is there anyway to make them encrypted so only the user that uploaded them can read them? Is it even possible and how to implement it?
Is convex api encrypted?
Is convex api encrypted? I mean are all of our http requests beeing sent encrypted to db?
Import users
I am creating a dashboard where admins can upload a csv with email and temporary password and people will get emails with verification code and they can signin and reset password, what's the best approach?
i mean do I have to call the signIn method individually? using convex auth...