RichCorbs
08/29/2021, 3:12 AMburggraf
08/29/2021, 3:17 AMDarkwebplayer
08/29/2021, 3:20 AMstorage update
function.
Update function goes like this
supabase
.storage
.from("bucketname")
.update("file.extension",file)
My doubt is how can i replace the existing file if its in a different file format(if i keep the same name and new file is in different format it gets unreadable right) , lets say initially it was 'png' now it is 'jpg'
Is there a way i could update the file in storage with a different type?waptik
08/29/2021, 7:24 AMCrane
08/29/2021, 8:33 PMCrane
08/29/2021, 8:34 PMCrane
08/29/2021, 8:35 PMCrane
08/29/2021, 8:35 PMburggraf
08/29/2021, 8:58 PMdanestves
08/30/2021, 4:56 AMdanestves
08/30/2021, 4:56 AMdanestves
08/30/2021, 5:00 AMajcwebdev
09/02/2021, 12:23 AMyarn rw prisma migrate dev
, (which is basically just a wrapper around prisma migrate dev
): https://www.prisma.io/docs/concepts/components/prisma-migrate
And I'm getting this error:
Error: Database error
Error querying the database: db error: ERROR: unexpected response from login query
0: sql_migration_connector::flavour::postgres::sql_schema_from_migration_history
at migration-engine/connectors/sql-migration-connector/src/flavour/postgres.rs:375
1: migration_core::api::DevDiagnostic
at migration-engine/core/src/api.rs:89
My Prisma schema:
datasource DS {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
binaryTargets = "native"
}
model User {
id Int @id @default(autoincrement())
githubId Int
handle String @unique
email String @unique
createdAt DateTime @default(now())
}
model Repository {
id Int @id @default(autoincrement())
githubId Int
fullName String
createdAt DateTime @default(now())
}
Redacted .env
file:
DATABASE_URL=postgres://postgres:password@db.xxxx.supabase.co:6543/postgres
SUPABASE_URL=https://xxxx.supabase.co
SUPABASE_KEY=xxx
SUPABASE_JWT_SECRET=xxx
ajcwebdev
09/02/2021, 12:36 AMEvаn
09/02/2021, 12:53 AMJannik Wempe
09/02/2021, 4:51 AMjason-lynx
09/02/2021, 10:25 AMymahmo
09/02/2021, 5:37 PMloooke
09/02/2021, 5:57 PMloooke
09/02/2021, 5:58 PMScott P
09/02/2021, 6:47 PMauth.uid()
function handles this automatically, so as long as your RLS policy checks that, users will only be able to view their own rowsloooke
09/02/2021, 7:44 PMsupabase.auth.setAuth
, auth.uid()
still needed a supabase session to work with, which was stored in a variableJannik Wempe
09/03/2021, 5:27 AMJannik Wempe
09/03/2021, 5:29 AMJannik Wempe
09/03/2021, 5:30 AMJannik Wempe
09/03/2021, 5:33 AMMichael Ketzer | streamgeist.com
09/04/2021, 3:50 PM(uid() = user_id)
+ WITH CHECK (role() = 'authenticated':: text)
.octalpixel
09/04/2021, 4:52 PMsilentworks
09/04/2021, 5:43 PMymahmo
09/04/2021, 10:46 PMPHONE LOGIN
let { user, error } = await supabase.auth.signIn({
phone: '+13334445555'
})
I get logged in, the session comes back to me after the OTP verify. But nowhere do I get the user object. It returns null