Post APSNvAHZjsAJgzPHXs by roobre@raru.re
(DIR) More posts by roobre@raru.re
(DIR) Post #APRIMCHFW6AtIHKdd2 by Paradox@raru.re
2022-11-09T21:08:10Z
0 likes, 0 repeats
Would it be better to save files as-is in a folder or store them in a db?I was reading an article saying db would be better for small images, but I dunno if there are other factors to consider.
(DIR) Post #APRIRxGYF0juTUkcbY by woodcat@raru.re
2022-11-09T21:09:14Z
0 likes, 0 repeats
@Paradox store a reference to the image in a db
(DIR) Post #APRIaQRLekK1H0q9p2 by Paradox@raru.re
2022-11-09T21:10:45Z
0 likes, 0 repeats
@woodcat Yeh my initial plan was to store a link to the image in the db and edit image src on load.Just curious if that's a shit idea.Also wondering if I should dump all images in one folder or give each user their own, but I don't think that one matter as much.
(DIR) Post #APRIumd0s3Vjse0IDI by woodcat@raru.re
2022-11-09T21:14:26Z
0 likes, 0 repeats
@Paradox i think it's pretty normal just to store resource URIs in the db. Keeps the database from getting too big too fast, and gives you a lot of flexibility for encryption and filesystems or even using a cdn
(DIR) Post #APSNvAHZjsAJgzPHXs by roobre@raru.re
2022-11-10T09:45:13Z
0 likes, 0 repeats
@Paradox Depending on how you want it to scale, object storage services like S3 are typically the best option, specially if you foresee having more, or a similar number of media objects than db entries