Skip to content

Review upload_dir processing #307

@NeilWJames

Description

@NeilWJames

There was a recent Wordpress support issue raised for bulk import. This caused me to investigate in greater detail the media file upload process. It is possible to identify more directly whether the upload is for the target file or for the thumbnail. Only in the case of target file being uploaded is the upload directory filter applied (as this is the only time the upload directory needs to be changed to the document library).

On download, the directory to be used using the "get_attached_file" filter - and here we can simply decide if the attachment is for a document and build the file location directly. This removes any process where core WP uses a caching process which may then need to be over-ridden).

Any thumbnail (when retrieved) does not have a document as its parent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions