Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

How to use firebase storage as backend to send/receive images? #155

Closed
rrpuente opened this issue May 1, 2020 · 11 comments
Closed

How to use firebase storage as backend to send/receive images? #155

rrpuente opened this issue May 1, 2020 · 11 comments
Labels

Comments

@rrpuente
Copy link
Contributor

rrpuente commented May 1, 2020

Good day, I read every doc I found, but I couldn't figure out how to use firebase storage as backend to send/receive images. Is it possible in the current version?
I saw about writing a backend api for any type of files, but that is not an option for me, I have to use firebase storage as backend.

Thanks in advance.

@rpaschoal
Copy link
Owner

Hi @rrpuente ,

I don't have any examples of how you would achieve an integration with firebase but I am confident you could write a custom adapter for that.

The examples that I have in place with this library can be found here, hopefully they'll be helpful with what you're trying to achieve:

https://github.com/rpaschoal/ng-chat-netcoreapp
https://github.com/rpaschoal/ng-chat-nodejs

@rrpuente
Copy link
Contributor Author

rrpuente commented May 5, 2020

Good day @rpaschoal, first of all, thanks for your reply and also for this awesome product you've made public. I'm using it in a new development and I plan to keep using it.
Indeed I created a custom adapter for firebase, and the images or files can be uploaded to firestore, the issue is that the image is not displayed in the chat window, it just shows a link to a file instead of the image itself.
Is there any way to show the image as part of the messages in the chat window?
Thanks again!

@rpaschoal
Copy link
Owner

There is no images to thumbnail previews implemented at this stage @rrpuente so the answer is no.

All there is in place at this stage is a linkify pipe that transforms text URLs to links.

@rpaschoal
Copy link
Owner

rpaschoal commented May 5, 2020

@rrpuente would you be keen on contributing and implementing this one?

The only changes I am planning on implementing at this stage as I am quite busy with other projects are:

@rrpuente
Copy link
Contributor Author

rrpuente commented May 6, 2020

Yes, Im willing to do it.
I just need some guidance, it will be my first time.

@rpaschoal
Copy link
Owner

rpaschoal commented May 6, 2020

Awesome @rrpuente ,

I think it might be prudent to wait for the changes I am working on right now. I am refactoring the internals and splitting the friends list and chat items to their own components. It will be easier to manage things that way.

I've already started pushing the changes on branch 3.0.1. Here's the work in progress pull request if you want to track it: #156

@rrpuente
Copy link
Contributor Author

rrpuente commented May 7, 2020

great, Ill do that.

@rpaschoal
Copy link
Owner

@rrpuente The changes were released and merged for 3.0.1. It should be much easier to manage what happens on a chat window as the visuals were moved into a separate Angular component.

I will be closing this pull request as the original topic had nothing to do with image thumbnail previews. Please feel free to open a new issue so we can track how you could implement and push a pull request for this.

In regards to firebase, there is no plan from my side to add an example of how to integrate ng-chat with it. The existing examples should be enough to showcase how the chat adapters can be implemented.

Thanks!

@rrpuente
Copy link
Contributor Author

rrpuente commented May 8, 2020

@rpaschoal
Noted.
I implemented the firebase adapter before asking for the image/thumbnail story.
thanks!

@Interscope19
Copy link

@rrpuente can u share ur code implementation about firebase to get an idea :(?

@rrpuente
Copy link
Contributor Author

Hi @Interscope19, the code I wrote was merged. If you search through the published code you will find it. However, if you cannot find it let me know.

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

No branches or pull requests

3 participants