we are facing an issue with a file/folder creation subscription.

Hi there,
we are facing an issue with a file/folder creation subscription.
We are using data events to subscribe to directory/file creation events in pantries project even the subscription was successful we didn’t receive any notifications from server side during file/directory creation .Below are the screenshots of our code and console log from the project.


hey and welcome in the forum @mb.jayashree

just checked and events are provided for both (directories, files). For example:

{"projectId":"2b15715e-d59c-11ea-8521-c7c5afd8319e","entityType":"directories","entityId":"894fea9a-a878-11ed-a1cd-3bf7e33783e4","event":"create"}
{"projectId":"2b15715e-d59c-11ea-8521-c7c5afd8319e","entityType":"files","entityId":"7f3adcf2-fa83-485a-a9c5-20669d8c7137","event":"create"}

make sure you subscribe with wildcard * for creations as you don’t know the ids upfront e.g. for directories directories.*.create or just for all creations: *.*.create

what should be the subscribe URL when we have to subscribe for new file uploads in a particular directory
our scenario is when a new file is uploaded to particular directory then only we have to get notification but in this situation we are getting notification while uploading files to other directories too not for the particular directory.

data-events does not support any context based filters, just on entity & event base.

You can load the meta information of a file and stop processing events, when they are in a different directory.