Open NfNitLoop opened 1 year ago
Additional things to consider:
For #92, we don't necessarily want to allow embedded items (or their attachments) to be served directly from a server at /u/:uid/i/:sig
just because they've been "embedded". Do we need to have different places for storing an item that the server should serve vs. just a lookup of (uid, sig) to contentHash?
When a user uploads an
Item
, its bytes are currently stored directly into theitem
table for easy access. But, that means that if multiple users sign and upload the sameItem
, it gets stored multiple times. And with #92 we'll already be storing some items into thestore
.Instead, we should always store the item's bytes into the content-addressable
store
.Implementation details to update:
Item
uploads store the bytes instore
.store
db
usage
andprune
to account for items stored in this way. (i.e.: don'tprune
rows fromstore
that have a correspondingitem
entry!)