Skip to content

File upload broken - using filterPathSegment breaks file extension from .extension to -extension  #6

@lapp

Description

@lapp

Hi,

first, thanks a lot for your nice work!
While testing, I have found semantical mistake in File\Upload processor on line 162:
if ((boolean)$this->modx->getOption('upload_translit')) { $internalName = $this->modx->filterPathSegment($internalName); $internalName = $this->mediaSource->sanitizePath($internalName); }
The code above uses filterPathSegment method which is not suitable for file names, because it replaces the dot with the dash.
This leads in "file extension" error, becasue without the dot, there is simply no extension found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions