Assets in bucket folder renamed on upload

There’s this weird behavior where asset names are changed during upload after which in production they can’t be matched with hrefs/src pages requesting them. Theres a hash added before file extension/format, I suspect it has to do with the idea that CI/CD uploads new versions, but I’d rather files in that folder would just get overwritten as there are currently several versions of those files in that binding/store/bucket. Did I miss a param in [site] section of wrangler.toml that dictates that assets replace each other and retain the same name?

1 Like

Also running into this issue with modules workers. Workaround is to define a separate workers project and share KV namespace with static assets and manifest.

Also related:

EDIT: If you’re interested in an alternative hacky solution, you could parse out the path name, perform a KV namespace list to search for the prefix, and manually assign the MIME types back in afterwards

EDIT2: Okay- figured it out. When running within miniflare, the __STATIC_CONTENT_MANIFEST attribute will exist inside the env object. When deployed, env does not contain __STATIC_CONTENT_MANIFEST and you need to import it. Don’t do the hacky list KV approach

1 Like

I’m not using export {fetch: ()=>()} format which is what modules should be, but I’ll just assume this bug applies to everything.Can you post your manifest @uda? I can’t tell what it should look like.

The manifest is generated for you by Wrangler on publish. My source code is available here:

The value of import manifest from '__STATIC_CONTENT_MANIFEST' in my deployed worker is


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.