Skip to content
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

Firestorage integration #26

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Firestorage integration #26

wants to merge 1 commit into from

Conversation

leehack
Copy link
Member

@leehack leehack commented Jul 3, 2023

  • Firestorage integration
  • Add Firestore emulator and instruction in readme

TODO:

  • Complete the business logic for uploading images

@leehack leehack requested a review from a team as a code owner July 3, 2023 12:43
@leehack leehack requested review from kezfran and aliyazdi75 and removed request for a team July 3, 2023 12:43
@leehack leehack marked this pull request as draft July 3, 2023 12:43
imageUrl:
'https://i1.wp.com/www.suitcasescholar.com/wp-content/uploads/2012/08/DSC_2583.jpg',
),
imageFile: File(
Copy link
Member Author

@leehack leehack Jul 3, 2023

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?

Copy link
Member Author

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?

Copy link
Member

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) {
Copy link
Member Author

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?

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants