Skip to content

The key "xxxx" has unallowed characters #9

@abcfy2

Description

@abcfy2

Hi there.

I always get this error:

> disk.getMetaData('公司合作协议.doc')
Uncaught:
Exception: The key "公司合作协议.doc" has unallowed characters
    at #validateCharacterSet (file:///home/fengyu/projects/DTeam-Top/tsw-team/node_modules/.pnpm/flydrive@1.1.0_@aws-sdk+client-s3@3.744.0_@aws-sdk+s3-request-presigner@3.744.0/node_modules/flydrive/build/chunk-V7XNXQTL.js:102:13)
    at _KeyNormalizer.normalize (file:///home/fengyu/projects/DTeam-Top/tsw-team/node_modules/.pnpm/flydrive@1.1.0_@aws-sdk+client-s3@3.744.0_@aws-sdk+s3-request-presigner@3.744.0/node_modules/flydrive/build/chunk-V7XNXQTL.js:130:31)
    at new DriveFile (file:///home/fengyu/projects/DTeam-Top/tsw-team/node_modules/.pnpm/flydrive@1.1.0_@aws-sdk+client-s3@3.744.0_@aws-sdk+s3-request-presigner@3.744.0/node_modules/flydrive/build/chunk-V7XNXQTL.js:172:33)
    at Disk.file (file:///home/fengyu/projects/DTeam-Top/tsw-team/node_modules/.pnpm/flydrive@1.1.0_@aws-sdk+client-s3@3.744.0_@aws-sdk+s3-request-presigner@3.744.0/node_modules/flydrive/build/index.js:34:12)
    at Disk.getMetaData (file:///home/fengyu/projects/DTeam-Top/tsw-team/node_modules/.pnpm/flydrive@1.1.0_@aws-sdk+client-s3@3.744.0_@aws-sdk+s3-request-presigner@3.744.0/node_modules/flydrive/build/index.js:84:17) {
  status: 500,
  code: 'E_UNALLOWED_CHARACTERS'
}

// convert to uri encode format
> disk.getMetaData('%E5%85%AC%E5%8F%B8%E5%90%88%E4%BD%9C%E5%8D%8F%E8%AE%AE.doc')
Uncaught:
Exception: The key "%E5%85%AC%E5%8F%B8%E5%90%88%E4%BD%9C%E5%8D%8F%E8%AE%AE.doc" has unallowed characters
    at #validateCharacterSet (file:///home/fengyu/projects/DTeam-Top/tsw-team/node_modules/.pnpm/flydrive@1.1.0_@aws-sdk+client-s3@3.744.0_@aws-sdk+s3-request-presigner@3.744.0/node_modules/flydrive/build/chunk-V7XNXQTL.js:102:13)
    at _KeyNormalizer.normalize (file:///home/fengyu/projects/DTeam-Top/tsw-team/node_modules/.pnpm/flydrive@1.1.0_@aws-sdk+client-s3@3.744.0_@aws-sdk+s3-request-presigner@3.744.0/node_modules/flydrive/build/chunk-V7XNXQTL.js:130:31)
    at new DriveFile (file:///home/fengyu/projects/DTeam-Top/tsw-team/node_modules/.pnpm/flydrive@1.1.0_@aws-sdk+client-s3@3.744.0_@aws-sdk+s3-request-presigner@3.744.0/node_modules/flydrive/build/chunk-V7XNXQTL.js:172:33)
    at Disk.file (file:///home/fengyu/projects/DTeam-Top/tsw-team/node_modules/.pnpm/flydrive@1.1.0_@aws-sdk+client-s3@3.744.0_@aws-sdk+s3-request-presigner@3.744.0/node_modules/flydrive/build/index.js:34:12)
    at Disk.getMetaData (file:///home/fengyu/projects/DTeam-Top/tsw-team/node_modules/.pnpm/flydrive@1.1.0_@aws-sdk+client-s3@3.744.0_@aws-sdk+s3-request-presigner@3.744.0/node_modules/flydrive/build/index.js:84:17) {
  status: 500,
  code: 'E_UNALLOWED_CHARACTERS'

And as you can see, I've tried to use uri encode format, also no use.

But this file exists, and R2 dashboard can display this file as well:

Image

Please help. Thanks.

Metadata

Metadata

Assignees

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