bitpart / rename-multibyte-filename
Rename a multibyte character filename, such as Japanese, Chinese, Korean, and so on, when assets are uploaded.
Installs: 42
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 5
Forks: 0
Open Issues: 0
Type:craft-plugin
Requires
- craftcms/cms: ^3.0.0
Requires (Dev)
- codeception/codeception: ^3.0
- craftcms/cms: ^3.2.0
- vlucas/phpdotenv: ^3.0
This package is auto-updated.
Last update: 2024-04-14 14:23:48 UTC
README
When a file whose filename contains multibyte character is uploaded, the filename will be renamed to ASCII character automatically.
Requirements
This plugin requires Craft CMS 3.0.0-beta.23 or later.
Installation
To install the plugin, follow these instructions.
- Open your terminal and go to your Craft project:
cd /path/to/project
- Then tell Composer to load the plugin:
composer require bitpart/rename-multibyte-filename
- In the Control Panel, go to Settings → Plugins and click the “Install” button for Rename Multibyte Filename.
Configuring Rename Multibyte Filename
Format
You can choose a format from options below.
- Time (Formatted: YmdHis) (e.g.
20200825203125.png
) - A hash value (e.g.
7b1c6a5ff46e54c0b0f89ea2f0fea8ff.png
) - Asset ID (e.g.
123.png
)
Volume Handle Name
You can choose how to add a volume handle to the filename.
- Do not add
- Insert before a filename (e.g.
images-20200825203125.png
) - Add after a filename (e.g.
20200825203125-images.png
)
Random String
You can choose how to add a random string (8 characters) to the filename.
- Do not add
- Insert before a filename (e.g.
wxafqvit-20200825203125.png
) - Add after a filename (e.g.
20200825203125-wxafqvit.png
)
Delimiter
You can choose a delimiter from the options below. The filename parts above will be joined with the delimiter.
- Hyphen:
-
- Underscore:
_
- Dot:
.
- No delimiter
You can also combine a volume handle and a random string together.