Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Angular : Problem in chat files attachment #6597


User avatar
0
Romka created

Hello,

I'm facing problems with the chatbar.

  1. The button to show up the attachment menu is appearing outside the visible port of the page. It seems that the dropup="true" option makes a css transform to translate the y coordinate, but it's overriden in the chatbar.component.less file, and set to "none !important", which makes it apperaring under the message text input (i.e, not visible).
  2. If I comment this line in the chatbar.component.less file, I'm able to see the menu. But if I try to attach an image, the "onUploadImage()" function in chatbar.component.ts fails, because it tries to parse the result (" const jsonResult = JSON.parse(event.xhr.response);"), but the "event" variable if of type Array<File>.

The 3 files (chatbar.component.less, chatbar.component.html and chatbar.component.ts) are from the ASPNETZERO 6.7.0 version, I did not edited them. My primeng version is 7.0.5, same as the template's one.

Is it a bug, or did I missed something ?

Thanks for your great work :)


6 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @romka

    Yes, this is kind of a bug. With the upgrade of PrimeNG, event.xhr is not filled anymore. We have changed this approach on AspNet Zero's dev branch (https://github.com/aspnetzero/aspnet-zero-core). You can update your files to the ones in dev branch and the problem will be solved.

  • User Avatar
    0
    Romka created

    Perfect, thanks for helping !

  • User Avatar
    0
    Romka created

    Hello @ismcagdas !

    I just updated with the last 6.8.0 version. You made, as usual, a great work.

    The chat has now 2 small problems.

    1. We are now able to send a file ; but, when the other user wants to download it, the browser opens a download dialog with "GetUploadedObject" instead of the original file name. "getUploadedObject" is the target remote method name in in xxxx.web.host/controllers/chatController.cs.
    2. The tooltip localized with key 'ChatUserSearch_Hint' in chat-bar.component.html, despite the "data-html='true'" attribute, does display the raw html text.
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @romka

    Sorry for my late response. Could you create the issue on https://github.com/aspnetzero/aspnet-zero-core/issues ? We will fix it immediately.

    Thanks,

  • User Avatar
    1
    Romka created

    Done,

    Thanks !

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks :)