thumbor / thumbor

thumbor is an open-source photo thumbnail service by globo.com

Home Page:http://thumbor.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does the order of the filters matter?

frankii91 opened this issue · comments

I made a simple filter to collect a string and pass it on to my extension that is responsible for result storage, or more precisely, the filter is to collect a string and add it to the name of the file in storage.
The filter only works as long as it is used as the first filter.
If I put this filter after the format(...) filter it doesn't work anymore, even in debug mode I can't see the filter being loaded...
Maybe there is some dependence that the filters have to be in a certain order?

#!/usr/bin/python

-- coding: utf-8 --

from thumbor.filters import BaseFilter, filter_method
from thumbor.utils import logger

class Filter(BaseFilter):
@filter_method(BaseFilter.String)
async def extension_name(self, text):
logger.debug("Extension extension_name: %s", text.lower())
self.context.request.extension_name = text.lower()

This issue is stale because it has been open 30 days with no activity. Remove the stale label or add a comment, or this issue will be closed in 15 days. You can always re-open if you still feel this is still an issue. Tag @heynemann for more information.

This issue was closed because it has been stale for 15 days with no activity.

This issue is stale because it has been open 30 days with no activity. Remove the stale label or add a comment, or this issue will be closed in 15 days. You can always re-open if you still feel this is still an issue. Tag @heynemann for more information.

This issue is stale because it has been open 30 days with no activity. Remove the stale label or add a comment, or this issue will be closed in 15 days. You can always re-open if you still feel this is still an issue. Tag @heynemann for more information.

This issue is stale because it has been open 30 days with no activity. Remove the stale label or add a comment, or this issue will be closed in 15 days. You can always re-open if you still feel this is still an issue. Tag @heynemann for more information.

This issue was closed because it has been stale for 15 days with no activity.

Filters are executed in the order they are specified.