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

    garyaustin

    02/03/2022, 8:05 PM
    update with filter
  • j

    jwarshack

    02/03/2022, 9:03 PM
    When I use getPublicURL for a storage bucket image, it automatically downloads the image instead of displaying it in the browser.
  • j

    jwarshack

    02/03/2022, 9:03 PM
    Any ideas how to get it to display?
  • o

    osaxma

    02/03/2022, 9:34 PM
    Anyone knows a way to add schemas when working with
    supabase/cli
    ? Unfortunately the local studio does not have a settings tab like the hosted one where extra schemas can be added...
  • j

    jokerface

    02/03/2022, 10:01 PM
    I tried to self install docker locally following the guide, I'm on WSL2 and followed everything but running
    docker-compose up
    gives me this error
    Copy code
    Traceback (most recent call last):
      File "urllib3/connectionpool.py", line 677, in urlopen
      File "urllib3/connectionpool.py", line 392, in _make_request
      File "http/client.py", line 1277, in request
      File "http/client.py", line 1323, in _send_request
      File "http/client.py", line 1272, in endheaders
      File "http/client.py", line 1032, in _send_output
      File "http/client.py", line 972, in send
      File "docker/transport/unixconn.py", line 43, in connect
    PermissionError: [Errno 13] Permission denied
    
    During handling of the above exception, another exception occurred:
  • j

    jokerface

    02/03/2022, 10:02 PM
    ok need to run as admin
  • t

    ThirdBase

    02/04/2022, 3:46 AM
    I must be doing something wrong as I can't get this trigger to work. My use case is I have a "profiles" table and an "articles" table. When a user updates the profiles table with a new user name, I want it to trigger an update on articles for the column "created_by". I keep getting a PATCH error with the message "column \"created_by\" does not exist" and I'm not sure why. My function to run on trigger is:
    Copy code
    begin
      UPDATE public.articles 
      SET created_by = public.getusername();
      RETURN created_by;
    end;
    return type trigger The getusername() function is:
    Copy code
    select username
    from public.profiles
    where id = auth.uid();
    And returns text. I know this function works as it's the default value on the articles table on row insert, but not sure why it keeps erroring on update
    g
    • 2
    • 5
  • t

    ThirdBase

    02/04/2022, 3:55 AM
    What do you mean? Do you mean what do you need to do to display the image using the API?
  • t

    ThirdBase

    02/04/2022, 3:56 AM
    You can set your image src by converting the data to objectURL like this:
    URL.createObjectURL(data)
  • g

    garyaustin

    02/04/2022, 4:00 AM
    update error
  • s

    Steve Phuc

    02/04/2022, 6:46 AM
    HI, I have this error when follow react quick start https://supabase.com/docs/guides/with-react#set-up-the-database-schema Module build failed (from ./node_modules/babel-loader/lib/index.js): TypeError: /node_modules/@supabase/gotrue-js/dist/module/lib/types.js: Cannot read properties of undefined (reading 'originalPositionFor') ERROR in ./node_modules/@supabase/storage-js/dist/module/lib/types.js Module build failed (from ./node_modules/babel-loader/lib/index.js): TypeError: .../node_modules/@supabase/storage-js/dist/module/lib/types.js: Cannot read properties of undefined (reading 'originalPositionFor') at SourceMapTree.originalPositionFor (.../node_modules/@ampproject/remapping/dist/remapping.umd.js:159:27) at trace (.../node_modules/@ampproject/remapping/dist/remapping.umd.js:102:37) at EncodedSourceMapImpl.map (.../node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js:347:36) at TraceMap.map (.../node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js:430:31) at SourceMapTree.traceMappings (.../node_modules/@ampproject/remapping/dist/remapping.umd.js:85:34) at remapping (.../node_modules/@ampproject/remapping/dist/remapping.umd.js:258:36) at mergeSourceMap (.../node_modules/@babel/core/lib/transformation/file/merge-map.js:19:30) at generateCode (.../node_modules/@babel/core/lib/transformation/file/generate.js:72:39) at run (.../node_modules/@babel/core/lib/transformation/index.js:55:33) at run.next () what need I do to fix it
    • 1
    • 1
  • s

    Steve Phuc

    02/04/2022, 7:07 AM
    error
  • a

    anothercoder

    02/04/2022, 7:56 AM
    Go to supabase dashboard>Table Editor>storage.objects, check the object's metadata column, whether the mimetype is an image e.g. "image/jpeg".
  • s

    saeris

    02/04/2022, 8:55 AM
    hey all! I'm setting up a nextjs app with supabase auth using the discord provider. I'm running into an issue whereby my redirect URL doesn't seem to be respected, not sure what I might have missed. As you can see in the screenshot, when I get to the Discord oauth page, it lists my supabase URL as the redirect target, which doesn't appear right to me. Additionally, when clicking authorize, I get redirected to
    http://localhost:3000/#
    , when in my code I've set my redirect options as follows for my signIn hook:
    Copy code
    await signIn(
      {
          provider: `discord`
      },
      {
          redirectTo: `http://localhost:3000/dashboard`
      }
    );
    Any ideas?
    a
    • 2
    • 14
  • e

    eri

    02/04/2022, 5:35 PM
    Hello, I am trying to get the posts from a table that it's policy is set to uid() = post_id in getStaticProps in next.js. If table has no policy, I am able to get the data, otherwise no data is returned. I am not able to find any documentation on this. Can someone help?
    g
    • 2
    • 2
  • s

    Shaun Regenbaum

    02/04/2022, 5:44 PM
    If I want to wipe all data from a project (essentially start with a clean slate, but keep the schemas and keys the same), how would I go about doing that? Like resetting the dev db
  • e

    eri

    02/04/2022, 6:16 PM
    if God exist here, please help me solve my problem above 🙏
  • g

    garyaustin

    02/04/2022, 6:45 PM
    getStaticProps
  • a

    adrian_h

    02/04/2022, 7:36 PM
    Yes! I'm having the issue right now, did you ever resolve this?
  • a

    adrian_h

    02/04/2022, 7:40 PM
    I'm having this issue rn â˜šī¸ were you ever able to resolve this issue?
  • a

    adrian_h

    02/04/2022, 7:56 PM
    Actually, found the issue here https://github.com/supabase/gotrue/issues/214
  • j

    jwarshack

    02/04/2022, 9:02 PM
    Thanks so much. I was trying to use an image that wasn't a jpeg/png.
  • t

    ThirdBase

    02/04/2022, 11:54 PM
    Hey I have another function question. Do they not support selecting count() in them? I have a query to select count that works in the query editor, but trying to create a function for it gives me an error saying syntax error at or near SELECT. Here's the query:
    Copy code
    SELECT COUNT(*) as row_count
    FROM public.article_comments
    WHERE article_comments.article_id = 2 AND
    article_comments.deleted <> true;
    g
    • 2
    • 9
  • t

    ThirdBase

    02/04/2022, 11:56 PM
    Even just doing a simple count from gives the same error so I assume it doesn't support it?
    Copy code
    SELECT COUNT(*)
    FROM public.article_comments
  • g

    garyaustin

    02/05/2022, 12:20 AM
    You must have some error right before Select in your function. Postgresql function should support all SQL that runs in editor, unless you get into RLS issues using them in rpc call, but you have a syntax error. Does it work if you select a column?
  • t

    ThirdBase

    02/05/2022, 12:30 AM
    No I get the same error. I can't even create the function with the above query because it gives me that message in the UI. Now that you mention it, let me try creating the function in the query. Maybe there's a bug in the UI
  • g

    garyaustin

    02/05/2022, 12:34 AM
    The UI also makes some language assumptions... "The language below should be written in
    plpgsql
    ." I think there is Begin and End involved, etc. If you want to go further on the discussion you should start a thread though as this is getting longer than mods like...😎
  • t

    ThirdBase

    02/05/2022, 12:34 AM
    Function Help
  • n

    namchee

    02/05/2022, 6:20 AM
    moved to #869406062036529193
  • j

    joshcowan25

    02/05/2022, 8:31 AM
    When I try to access one of my table on Supabase website, I get this error (error is on supabase website). What can I do?
1...213214215...316Latest