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

Conditional Notification Text & URL #7004


User avatar
0
sedulen created

I have a use-case where a user requests a file download on a different page. That page submits a request, which is queued for processing in the background via BackgroundJobManager. When the request is processed, the file is placed in Azure block storage, and then a notification is posted back to requesting user that their file is ready. The notification text & url then allow the user to download the file that was generated. Lastly, there is a separate background job that is scheduled for ~3 days from when the file was created to expire that file, removing it from Azure block storage.

This is a fairly common practice, and I believe the latest version of ASPNet Zero does this with the GDPR collected data, only it uses the local Temp File storage, so it's a single click file download behavior.

My question is - in the Notification message text, is there a way to setup conditional logic for the text & url of the notification? I'm looking at the UserNotificationHelper.ts class in my Angular project, and I see where "text" and "url" are being set.

Has anyone tried to customize this code to conditionally set the "text" or "url"?

Thanks, -Brian


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

    Hi @sedulen

    UserNotificationHelper.ts is the right place but it is not much extensible, you have to modify its code.