Question about how to newly added resource
See original GitHub issueHi, thank you for creating this wonderful project.
I’m using sirv
with sapper
to serve some static images. And these images can be uploaded through back-end. Then these images will be relocated to sirv
’s dir
.
Because sirv
will only scan file-system once when it’s imported, these newly added images will not exists in cache, so you get 404 when visit these images in browser.
So my question is, can we add some logic, like lookup file-system when resource not found, to handle newly added resource?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Can not get newly added files from Resources.resx
I've tried seting Access Modifier in Resources.resx to Internal and Public hoping to solve that problem, but then I get error in Resources....
Read more >Three questions to ask before using a new digital resource
Here, Michael Windelspecht talks through three key questions to ask before making a choice, filmed as part of REMOTE: The Connected Faculty ...
Read more >Move resources to a new resource group or subscription
Use Azure Resource Manager to move resources to a new resource group or subscription.
Read more >Problem adding resources in MS Project
The purpose of this view is to list each resource assignment below the relevant task. Check if you're using the Task Usage view...
Read more >Resource Questions - SDP help desk guide - ServiceDesk Plus
On the resource questions list view page, click New Question. ... Add choices manually - Enter your choice in the Option text box...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey, than you 😃
There’s no way to expose/update the cache post-startup. This is intentional. What I would recommend doing is organizing your assets in such a way that your assets (the website’s) are in one location, and the dynamic, user-uploaded images are somewhere else.
Then you would run two instances of
sirv
– a “dev” variant for the user images (since theyre transient) and “prod” for your own.The final snippet would roughly look something like this:
Hope that helps!
Thanks. Feel free to open an issue/RFC and it can collect feedback. Please include any relevant API/option suggestions for how it might be done, because at this point I can’t imagine a non-confusing way to distinguish between “just what’s here”, “use file system”, and “do both”.
It might be worth considering for a 2.0 at some point – at which time I’ll also be sure to rename the option.