-
Notifications
You must be signed in to change notification settings - Fork 0
Firestorage integration #26
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
base: main
Are you sure you want to change the base?
Conversation
imageUrl: | ||
'https://i1.wp.com/www.suitcasescholar.com/wp-content/uploads/2012/08/DSC_2583.jpg', | ||
), | ||
imageFile: File( |
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.
The code here doesn't work.
Probably we want to pass bytes instead of File once we read it from the image picker.
@aliyazdi75 @billyandco What do you guys think?
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.
One more thing to consider.
Should we separate the image upload and posting in the UI? or do it together?
Should we better create an upload
method in postingRepository
or does the add
method do both?
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.
Yes, I think we need to pass the bytes instead.
final Reference storageRef; | ||
|
||
@override | ||
Stream<FirestorageEvent> upload(File image) { |
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.
This needs to be implemented properly. I'm thinking of creating a type for the argument that contains metadata + filepath or byte array of the file.
@aliyazdi75 @billyandco What do you guys think?
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.
Yes I think keeping metadata is useful and byte array.
TODO: