Kiel
Kiel
CC#
Created by Kiel on 5/17/2024 in #help
Coupling attachments/files to the database in a portable way.
man those metrics are weird, hard to wrap my head around wtf a TB mo is LOL
27 replies
CC#
Created by Kiel on 5/17/2024 in #help
Coupling attachments/files to the database in a portable way.
i think they're limited to 10gb for free and then $6/TB mo, dunno for sure
27 replies
CC#
Created by Kiel on 5/17/2024 in #help
Coupling attachments/files to the database in a portable way.
thanks for the advice, probably better than rolling my own file storage nonsense
27 replies
CC#
Created by Kiel on 5/17/2024 in #help
Coupling attachments/files to the database in a portable way.
yeah, i'm not sure if it changes things but I do want to ensure these files persist indefinitely, so it seems that R2 might not be feasible for long term
27 replies
CC#
Created by Kiel on 5/17/2024 in #help
Coupling attachments/files to the database in a portable way.
I'm a little confused by the pricing. 10 GB/month means I'm allotted 10 total GB of storage?
27 replies
CC#
Created by Kiel on 5/17/2024 in #help
Coupling attachments/files to the database in a portable way.
I'd trust a company to do a better job storing and securing random files than my own dumb ass at least, as long as they have some sort of API interop
27 replies
CC#
Created by Kiel on 5/17/2024 in #help
Coupling attachments/files to the database in a portable way.
I'll look into backblaze, maybe. I'm talking like...between 5-10 attachments being created a month, and most are less than 10mb, some are even less than 1mb
27 replies
CC#
Created by Kiel on 5/17/2024 in #help
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
CC#
Created by aCasualNon on 3/7/2024 in #help
how do i split for example t he string "dog" into "d" "o" "g"
(will still iterate over chars but I digress)
8 replies
CC#
Created by aCasualNon on 3/7/2024 in #help
how do i split for example t he string "dog" into "d" "o" "g"
but...this will be a char[] and not string[] which is probably not what you want?
8 replies
CC#
Created by aCasualNon on 3/7/2024 in #help
how do i split for example t he string "dog" into "d" "o" "g"
.ToCharArray() is probably the simplest way to do it
8 replies
CC#
Created by kurumi on 2/28/2024 in #help
HttpListener implements IDisposable but there is not Dispose() method, why and how can I dispose it?
IE (_listener as IDisposable).Dispose() or ((IDisposable) _listener).Dispose()
7 replies
CC#
Created by kurumi on 2/28/2024 in #help
HttpListener implements IDisposable but there is not Dispose() method, why and how can I dispose it?
you could cast it to IDisposable first and then dispose it, some classes hide their implementation of Dispose for one reason or another
7 replies
CC#
Created by Core on 12/31/2023 in #help
Is there a standard option to generate UUID version 7? (Guid)
it's not available in the BCL yet and probably won't be for awhile if ever just to avoid confusion over multiple potentially conflicting UUID types
10 replies
CC#
Created by Core on 12/31/2023 in #help
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
CC#
Created by Dinny on 12/4/2023 in #help
input file error
then when debugging you can inspect the values of xString, yString, zString
222 replies
CC#
Created by Dinny on 12/4/2023 in #help
input file error
string xString = nextItem[0];
uint x = Convert.ToUInt32(xString);
string yString = nextItem[1];
uint y = Convert.ToUInt32(yString);
string zString = reader.ReadLine();
uint z = Convert.ToUInt32(zString);
string xString = nextItem[0];
uint x = Convert.ToUInt32(xString);
string yString = nextItem[1];
uint y = Convert.ToUInt32(yString);
string zString = reader.ReadLine();
uint z = Convert.ToUInt32(zString);
assuming all your inputs are strings
222 replies
CC#
Created by Dinny on 12/4/2023 in #help
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 why
222 replies
CC#
Created by Lionel Bovy on 12/2/2023 in #help
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
CC#
Created by Lionel Bovy on 12/2/2023 in #help
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