Kiel
Coupling attachments/files to the database in a portable way.
The issue is that if I'm developing on device A and deploying to device B, I'd then have to copy the file state between devices each time
or if I were debugging an issue (A), I'd have to copy all data from device B in case it is related to the file storage
27 replies
Is there a standard option to generate UUID version 7? (Guid)
I use https://github.com/medo64/Medo.Uuid7 - it has efcore integration to take care of all the conversion stuff i believe
10 replies
input file error
two things:
1. it's better practice to use
uint.(Try)Parse
than Convert methods - those are older mostly reserved for legacy purposes
2. it doesn't hurt to separate the assignment and conversion so you can more easily see what the "input" is - if it's not the right format, it's not the right format, so you may need to find out why222 replies
Serving static files via a Web API (REST)
I'm unsure why asp.net works in this way...maybe there's a more robust solution for what you're trying to do - what's your end goal - determining the physical file location to save files in? Is
Directory.GetCurrentDirectory()
sufficient for your needs?4 replies
Serving static files via a Web API (REST)
https://stackoverflow.com/questions/59304961/how-can-i-get-access-to-the-iwebhostenvironment-from-within-an-asp-net-core-3-co#comment104851604_59305508
OK I finally reproduced the issue. The API template you use doesn't create a wwwroot folder, which is why you get a NullFileProvider. If you add a wwwroot folder (it can be empty), you'll have a PhysicalFileProvider.
4 replies