-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(config): allow svg and increase body size #1729
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Må være litt forsiktig med tanke på sikkerhet osv med denne PRen. Kanskje det er greiest om man dropper å kunne laste opp SVG? 🤔
2f22a5f
to
4186e0d
Compare
return setFormError(getFormFeedbackForError('file/invalid')) | ||
case 403: | ||
return setFormError( | ||
getFormFeedbackForError('auth/operation-not-allowed'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vil denne casen noen gang vises? Siden om man får 403, så blir man bare redirected til forsiden og denne formErroren vil aldri vises til noen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ja, det stemmer! Har tenkt litt over det og mtp at det er gjennom APIet tenker jeg at vi heller bør fjerne redirect fra den og bare returnere 403 (forbidden). Da får man riktig respons om man prøver å poste utenfor uiet vårt 🤔 Jeg har ikke sett et API returnere redirect om man ikke har tilgang 💭 det passer vel mer til slik vi hadde det før
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brukere vil jo kjenne til dette endepunketved å se via nettverkskall og slikt. Burde vi sikre det på noe vis? Nå kan man pr def spamme oss ned med logoer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bra tenkt :) Skal undersøke rate-limiting.
setFile(e.target.value) | ||
setFileName(e.target?.files?.item(0)?.name ?? 'Logo uten navn') | ||
|
||
const selectedFile = e.target.files?.[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kunne man heller returnert denne mye tidligere om files ikke fantes? Så slipper vi å håndtere !selctedFile?
After: can upload svgs and files with size less than 10mb (svg img uploaded below)