[wp-trac] [WordPress Trac] #54067: Filenames shouldn't hold dots

WordPress Trac noreply at wordpress.org
Fri Sep 3 07:51:39 UTC 2021


#54067: Filenames shouldn't hold dots
-------------------------+-----------------------------
 Reporter:  bedas        |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Media        |    Version:
 Severity:  minor        |   Keywords:  2nd-opinion
  Focuses:               |
-------------------------+-----------------------------
 When uploading a file (attachment) to WP (posts or else) and said file has
 dots in its name (like it is the case for Screenshots) then the File URL
 becomes something like
 `https://site.tld/wp-
 content/uploads/Screenshot-2021-09-03-at-13.10.46.png`

 While that is expected perhaps WP Could check if there are dots in the
 filename and either replace them by a dash or fully reject the upload.

 Dots in the filename create issues when creating download links, for
 example, where then the downloaded attachment ends up being a format of
 "46", instead of "png", taken in above example.

 It should be great if this can be avoided, as dots in filenames are likely
 not a good idea to have anyway, but telling that the consumers is rather a
 exorbitant and almost impossible task.

 Of course we could validate uploads on our own, however I think it would
 be a good thing to have directly in the media uploader.

 Happy to stand corrected :)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54067>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list