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

Send images #162

Closed
nikolaynesov opened this issue Sep 14, 2016 · 2 comments
Closed

Send images #162

nikolaynesov opened this issue Sep 14, 2016 · 2 comments
Labels

Comments

@nikolaynesov
Copy link
Contributor

Hi,

What do you think is the best way for simple images sharing in chat app using this package?

  1. upload image & create new message with image name and some prefix to determine that it is image, not a simple message. It means 1 message = 1 image.
  2. Separate attachments model. Upload images as attachments & attach them to some message with pivot table. 1 message + multiple images attached.
  3. Use tags inside a message with image names like [img-name] and covert them to images in frontend. 1 message + multiple images attached.
    Or maybe something else?
@antonkomarev
Copy link
Contributor

antonkomarev commented Sep 14, 2016

In my opinion images should be stored in external table to have more manipulation capabilities and using them in other parts of the application.

@cmgmyr
Copy link
Owner

cmgmyr commented Sep 14, 2016

I'd also go with option 2, that way you can use the attachments any way you want and also implement them throughout the app if needed - like with Polymorphic Relations (adding attachments to posts, pages, etc) might be helpful.

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

No branches or pull requests

3 participants