Open
Conversation
…react into 195-add-image-selection
…t needed CI build commands
| }, | ||
| "dependencies": { | ||
| "@react-native-community/slider": "^2.0.8", | ||
| "@react-native-firebase/app": "^6.4.0", |
Contributor
There was a problem hiding this comment.
We use v5 of firebase library already. We shouldn't mix it with v6
the best option would be to migrate to v6 ;) but that's a separate task
| "react-native-floating-action": "^1.19.1", | ||
| "react-native-gesture-handler": "^1.5.6", | ||
| "react-native-image-crop-picker": "^0.26.2", | ||
| "react-native-image-picker": "^2.3.1", |
Contributor
There was a problem hiding this comment.
I suggest to use react-native-image-crop-picker as it's already on the dependency list
| import uuid from 'react-native-uuid'; | ||
| import { getImagesStorage } from '../models/FirebaseRefProxy'; | ||
|
|
||
| export const uploadImage = async (imageUri: string, fileName: string | undefined): Promise<string> => { |
Contributor
There was a problem hiding this comment.
if fileName can be undefined, we can make it optional parameter fileName?
| export const uploadImage = async (imageUri: string, fileName: string | undefined): Promise<string> => { | ||
| const DEFAULT_EXTENSION = '.jpg'; | ||
| const fileExtension = fileName ? fileName.split('.').pop() : DEFAULT_EXTENSION; | ||
| const uploadedFileName = `${uuid.v1()}.${fileExtension}`; |
Contributor
There was a problem hiding this comment.
Firebase would generate filename for us :)
pwysowski
approved these changes
Jun 18, 2020
Contributor
pwysowski
left a comment
There was a problem hiding this comment.
I think you should consider all comments added by Bartek and then you should merge ;)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Not the greatest solution however should unblock a few tasks. During workin on this some problems with selecting from device appears - to unblock this part I extracted a separated task #290. We will need to cover things like loading images in the future (loading bar or even preload all images on plan start to improve user experience). Another thing is #291 which blocked me from testing image displaying on task edition and image reselection.