You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I am trying to getItem form the assets folder via useStorage('assets:server').getItemRaw<Buffer>('logo.png')
when I use toString('base64') it works well just on localhost, but when I deploy it on Vercel I am getting a binary and can't find a way how to convert it to base64 getItem and getItemRaw returns the same output on Vercel.
So is there any way how to unify the behavior of the storage on both environments? local and prod? Or any other use how to just use local asset within the endpoint (the case is to generate PDF via pdfmake and use some images and fonts..)
Thanks for clarification
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi I am trying to
getItem
form the assets folder viauseStorage('assets:server').getItemRaw<Buffer>('logo.png')
when I use
toString('base64')
it works well just on localhost, but when I deploy it on Vercel I am getting a binary and can't find a way how to convert it to base64getItem
andgetItemRaw
returns the same output on Vercel.So is there any way how to unify the behavior of the storage on both environments? local and prod? Or any other use how to just use local asset within the endpoint (the case is to generate PDF via
pdfmake
and use some images and fonts..)Thanks for clarification
Beta Was this translation helpful? Give feedback.
All reactions