-
Notifications
You must be signed in to change notification settings - Fork 548
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
OHRM5X-1733: Develop buzz - share photo component #1510
Conversation
5f2c3f7
to
a993807
Compare
photos() { | ||
return (this.media || []).map(photo => { | ||
const {type, base64} = photo; | ||
return `data:${type};base64,${base64}`; |
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.
can this component reuse, if we provide img src as URLs?
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.
yeah. planning to reuse.
const fileTypeValidator = validFileTypes([ | ||
'image/gif', | ||
'image/jpeg', | ||
'image/jpg', | ||
'image/pjpeg', | ||
'image/png', | ||
'image/x-png', | ||
]); | ||
const fileSizeValidator = maxFileSize(1024 * 1024 * 2); |
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.
will get valid file types and size from BE via props. any possibility to hard code in controller for the moment
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.
I checked. Issue is this componet is deep inside. maybe we will have to use provide/inject
name: 'PhotoUploadArea', | ||
|
||
components: { | ||
'oxd-icon': Icon, |
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.
shall we register Icons as a global component, if it is highly used?
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.
I think we have globally registered oxd-icon-button
component. this is used in few places, but at this stage no difference
No description provided.