-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Avatar Image Upload Limit #5900
Changes from 10 commits
1e74b9e
c28e73e
4357ffc
754045f
921a577
6d5f1fb
601151a
d9c7583
40efded
9f8c0d9
e288d0c
5fadd0a
470b3c3
37fb1fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ import React, {Component} from 'react'; | |
import {Alert, Linking, View} from 'react-native'; | ||
import {launchImageLibrary} from 'react-native-image-picker'; | ||
import RNDocumentPicker from 'react-native-document-picker'; | ||
import lodashGet from 'lodash/get'; | ||
import {propTypes as basePropTypes, defaultProps} from './AttachmentPickerPropTypes'; | ||
import styles from '../../styles/styles'; | ||
import Popover from '../Popover'; | ||
|
@@ -65,7 +66,7 @@ function getDataForUpload(fileData) { | |
name: fileData.fileName || fileData.name || 'chat_attachment', | ||
type: fileData.type, | ||
uri: fileData.uri, | ||
size: fileData.size, | ||
size: lodashGet(fileData, 'fileSize', lodashGet(fileData, 'size')), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need lodashGet here? will There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still a question? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ohh I did answer this yesterday, can't find the comment. Earlier we had There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok. I think it is better like this.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated. I thought generally we use |
||
}; | ||
} | ||
|
||
|
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 hoped you would change the name AVATAR_MAX_ATTACHMENT_SIZE
_MB. Don't forget to update the references.