Angular : Problem in chat files attachment #6597
I'm facing problems with the chatbar.
- 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).
- 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
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 :)
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.
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.
- 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.
- The tooltip localized with key 'ChatUserSearch_Hint' in chat-bar.component.html, despite the "data-html='true'" attribute, does display the raw html text.
Sorry for my late response. Could you create the issue on https://github.com/aspnetzero/aspnet-zero-core/issues ? We will fix it immediately.