https://supabase.com/ logo
Join Discord
Powered by
# javascript
  • g

    garyaustin

    02/10/2022, 9:11 PM
    You need a filter, which turns into a where in postgres. Something like .match({ name: 'Auckland' })
  • k

    Keooo

    02/10/2022, 9:27 PM
    thanks il have a try its weird because it was working fine the first way I had it the other day
    g
    s
    • 3
    • 5
  • n

    n

    02/10/2022, 10:44 PM
    I'm running into the same issue as well. Did you find a solution?
    g
    • 2
    • 6
  • j

    jords

    02/10/2022, 11:33 PM
    I have RLS enabled on my database table but I can still read and write data with the anonymous key. Why is this?
    Copy code
    js
    const { createClient } = require('@supabase/supabase-js')
    
    const supabaseUrl = "https://jnalzpuoivntwiythznc.supabase.co";
    const supabaseAnonKey = "MY_ANON_KEY";
    
    const supabase = createClient(supabaseUrl, supabaseAnonKey);
    
    (async function getData() {
      const {data, error} = await supabase
        .from("vaults")
        .select("*");
      console.log(data);
    })();
    g
    • 2
    • 5
  • g

    garyaustin

    02/10/2022, 11:51 PM
    RLS with anon key
  • g

    garyaustin

    02/11/2022, 12:10 AM
    cast column
  • u

    「 stripess 」

    02/11/2022, 12:11 AM
    hey folks, got an issue with migrating from Firebase Auth to Supabase Auth: https://github.com/supabase/supabase/discussions/5418 would love some help / ptrs here!
  • m

    mikelyndon

    02/11/2022, 2:13 PM
    Hey folks. I feel like this should be easier - I'm trying to get the id of a newly created row after uploading an object to storage. Currently I'm: 1. Upload object.
    Copy code
    let { data, error } = await supabase.storage
            .from("assets")
            .upload(filePath, file);
    2. Get list of all assets for a user `const { data: assets } = await supabase.storage .from("assets") .list(
    ${user.id}
    );` 3. Find the id by matching the name column
    const newAsset = assets.find((element) => element.name === file.name);
    g
    • 2
    • 6
  • m

    mikelyndon

    02/11/2022, 2:17 PM
    I should add my end goal is to add that id to a row in another table.
  • g

    garyaustin

    02/11/2022, 3:36 PM
    getting storage id
  • k

    Keooo

    02/12/2022, 3:56 PM
    Has anyone done the eggheads.io saas course and deployed? im having a issue with NEXTJS getServerSideProps showing the user is null Also I tried this tutorial too and it does not work.
  • k

    Keooo

    02/12/2022, 3:56 PM
    https://dev.to/dabit3/magic-link-authentication-and-route-controls-with-supabase-and-next-js-leo
  • k

    Keooo

    02/12/2022, 3:59 PM
    I see its an issue https://github.com/supabase/supabase/issues/1735
  • i

    isosceleskramer

    02/13/2022, 2:24 AM
    Anyone using supabase with sveltekit for auth and profiles? There's the built in private users table. The recommendation for user-managed profile fields is to create a separate
    profiles
    table. I have the postgres stuff working to automatically create a profile entry for new users. When someone logs in to the sveltekit app I need the User and Profile to be persistent but I'm not seeing any built-in way to do this. Is that true? Do I need to rely on setting localstorage or something to store the Profile data when a user first logs in?
    s
    j
    • 3
    • 5
  • s

    silentworks

    02/13/2022, 10:42 AM
    SvelteKit and Supabase
  • j

    jaf

    02/13/2022, 1:20 PM
    Is there a way to deal with not null constraint errors when upserting? Ideally I want to just ignore the rows that throw the error
  • j

    jaf

    02/13/2022, 1:22 PM
    Or an easy solution for this problem https://github.com/supabase/postgrest-js/issues/174
  • t

    tavin

    02/13/2022, 7:02 PM
    Is there a way to exclude fields from being replicated (realtime)? For example: When a user is updated, it's password does not get replicated via websockets
  • g

    garyaustin

    02/13/2022, 7:27 PM
    No way to to exclude. I assume password is just an example, don't think realtime works on auth schema.
  • t

    tavin

    02/13/2022, 7:40 PM
    Great, thanks
  • p

    productdevbook

    02/14/2022, 7:29 AM
    typeorm execute raw sql import ?
  • z

    ze

    02/14/2022, 3:51 PM
    Hello, is there a way to move files across buckets, without downloading and reuploading? Looking at the docs it doesn't seem like it, but wanted to confirm 🙂 Thanks
  • g

    garyaustin

    02/14/2022, 3:53 PM
    No.
  • z

    ze

    02/14/2022, 3:54 PM
    ok, thanks
  • p

    pseamusmc

    02/14/2022, 5:39 PM
    Does anyone know if I can get joined table values on real-time updates?
  • u

    ˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞

    02/14/2022, 7:29 PM
    does anyone know why the js library throws
    ReferenceError: XMLHttpRequest is not defined
    when trying to upload a file to storage?
  • u

    ˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞

    02/14/2022, 8:03 PM
    i'm trying to use it with cloduflare workers i've tried specifying
    { fetch: fetch.bind(globalThis) }
    but it doesn't seem to do anything
  • j

    jwarshack

    02/14/2022, 10:32 PM
    What is the best way to check if a file exists and if it does, get the public URL?
  • h

    HerbeMalveillante

    02/15/2022, 6:19 PM
    Hello ! I'm working on a post system, and I have setup these policies : My goal is that any user can retrieve his own posts, even if they are private, and all the public posts. Each post has an "author_id" foreign key that is the same as the author's uid(), and a "is_public" attribute that is used to tell supabase if the post is public or not. My problem is, when retrieving all posts, I can only see public posts... Any idea why ? Thanks for you help : I'm pretty new with supabase lol
  • h

    HerbeMalveillante

    02/15/2022, 6:20 PM
    here is my "posts" table
1...474849...81Latest