Comments (11)
Can I work on this ?
from inbox.
between
Agree! We could prefix the nanoId with the type so it ends up like _. Unkey is doing that (as well as stripe) and I love that
from inbox.
prefix the nanoId with the type so it ends up like _.
good idea, updated issue description
we good to go @cstrnt ?
from inbox.
Looks good to me. Should be scoped well enough for implementation
from inbox.
I would honestly just add a field to each model in the db schema like avatarUrl
which can be nullable.
This allows us to not fetch the avatar if there isn't one or just default to some other URL :)
Also makes caching less of an issue since we aren't just re-using the same URL but rather generate a new URL for the avatar. Therefore we can just mark the old avatar as immutable and cache it on the CDN and browser forever
from inbox.
@cstrnt are you working on this ??
from inbox.
@skushagra9 nope, I think we should still discuss a little about the implementation and its implications before we do that. Feel free to leave your thoughts here
from inbox.
I would honestly just add a field to each model in the db schema like avatarUrl which can be nullable.
This is how we had it when using cloudflare images
switched to current method to ensure that unused (replaced) avatars dont take up unnecessary storage space
we could achieve the same as your proposal by having avatar = true
in the db instead of a url
and pass that to the avatar component
though this dosnt solve the caching issue
from inbox.
That's right, both solutions have advantages and disadvantages. I personally lean towards the solution of storing the url in the db (reference: dub)
from inbox.
thought about this some more
i agree with your approach @cstrnt but we should store an avatarId (not full url) in the tables.
the url would end up being the storage app url which may change over time (CDN, regions, AGI etc)
we can generate this avatarId using nanoIdLong
from utils package (32 char length alphanumeric id)
Q: when uploading to s3, current path format is /avatars/${type}/${profile.publicId}
- do we keep type
as a separation between avatar types, or merge all into one path?
from inbox.
updated issue description
from inbox.
Related Issues (20)
- cant delete group convos
- migrate(react/next): settings:sidebar
- next: invalidate all query caches on logout
- when new external reply, convo "last updated at" is not updated HOT 1
- errors when deleting convo HOT 1
- new convo with org member+team error
- when convo is hidden, delete prompt should say "unhide" HOT 1
- forwarding email addresses dont work
- change inline image storage to be dynamic url instead of fixed
- fails to redirect when logging out of all sessions
- dark mode comment color is not correct
- add "delete account" HOT 2
- can't use suggest password
- Enhancement: Typed TRPC Errors
- next: when no convos show placeholder
- error: contact global reputation table duplicate entry HOT 1
- sidbar version linking
- billing: fail with discount
- mail bridge cant identify email identity
- handle imcoming attachments with illegal characters
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inbox.