only write rules.xml in upload folder, not in static folder