uploadthing icon indicating copy to clipboard operation
uploadthing copied to clipboard

[bug]: renameFile method renamed to renamedFiles (according to the documentation)

Open kx0101 opened this issue 2 years ago โ€ข 0 comments

Provide environment information

System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
    Memory: 24.22 GB / 31.29 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 18.13.0 - /usr/bin/node
    npm: 9.2.0 - /usr/bin/npm
    bun: 1.0.0 - ~/.bun/bin/bun
  Browsers:
    Chrome: 120.0.6099.129

Describe the bug

According to this page of the documentation, the method name for renaming the files is renameFiles. However, I found out that in your sdk file, it is after the name of renameFile singular.

SInce this method accepts either a string or an array of strings, I thought that it would make sense to rename it to renameFiles.

Link to reproduction

https://stackblitz.com/edit/github-c8cidr?file=src%2Fserver%2Fuploadthing.ts

To reproduce

  1. Instantiate UTApi from uploadthing/server
  2. Attempt to use the method named renameFiles

Additional information

No response

๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Contributing

  • [X] ๐Ÿ™‹โ€โ™‚๏ธ Yes, I'd be down to file a PR fixing this bug!

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

kx0101 avatar Jan 09 '24 07:01 kx0101