Skip to content

empty files folders for each page #579

@BernhardBaumrock

Description

@BernhardBaumrock

Short description of the issue

It seems that ProcessWire creates an empty folder for every page that has a file (or image) field on it.

There is this topic in the forum that says this has been addressed several years ago, but testing a new module with 100k pages I realized that I have 100k empty folders in my installation! https://processwire.com/talk/topic/1585-module-clean-empty-directories-from-siteassetsfiles/

Expected behavior

The folder should be created only if a file is uploaded to that page. It should be removed when all files are deleted to keep /site/assets/files clean.

Steps to reproduce the issue

  1. Install PW, choose default profile
  2. Create a new page, template "basic-page" (having an "images" field)
  3. There will be an empty folder /site/assets/files/#newpageid#

Setup/Environment

  • ProcessWire version: 3.0.99
  • PHP version: 7.1.6
  • MySQL version: 5.7
  • Fresh install with AOS + Tracy

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions