Developer forum

Forum » Development » Image impressions - Get Image

Image impressions - Get Image

Nuno Aguiar
Reply

Hi,

 

Is there a way to extend the getImage handler? We would like to control the number of impressions of an image.

 

As a workaround we can develop a handler that acts as a gateway to getImage, but would like to avoid that.

 

Best Regards,

Nuno


Replies

 
Nicolai Høeg Pedersen
Reply

You can listen to the BeginRequest notification and check what is in the URL.

http://developer.dynamicweb-cms.com/api8/#Dynamicweb~Dynamicweb.Notifications.Standard+Application~BeginRequest.html

See if it is GetImage that is being called and you have the file in Querystring. Return 404, 307 or a 301/2 if impressions has passed.

 
Nuno Aguiar
Reply

Hi Nicolai,

 

Thanks, this is perfect for what we need. In the future, if the meta data methods are exposed in the API we can even have it integrated directly in the file data and access it in the File Manager.

 

Best Regards,

Nuno

 

You must be logged in to post in the forum