Skip to content

storage.download() returns stale/cached data after file updates #41841

Closed

Description

When using supabase.storage.from('bucket').download(path) in Supabase Edge Functions, updated
files are not reflected immediately. The method appears to have HTTP-level caching that
serves stale data.

Reproduction:

  1. Upload a JSON file to storage
  2. Call download() to fetch it
  3. Update the file in storage (via dashboard or API)
  4. Call download() again → still returns old content

Workaround:
Using createSignedUrl() + manual fetch with cache: 'no-store' returns fresh data:

const { data: urlData } = await supabase.storage
.from('bucket')
.createSignedUrl(path, 60);

const response = await fetch(urlData.signedUrl, { cache: 'no-store' });
const blob = await response.blob();

Expected behavior:
download() should return the current file contents, not cached data.

Environment:

  • Supabase Edge Functions (Deno)
  • @supabase/supabase-js v2

Activity

  1. added
    bug
    on Jan 11, 2026
  2. added
    external-issue
    on Jan 11, 2026
  3. added
    pr-opened
    and removed on Jan 12, 2026
  4. 7ttp commented on Mar 10, 2026

    @7ttp
    Member

    Fixed in supabase/supabase-js#2090
    Closing this up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugexternal-issuepr-opened

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions