dimer47 / node-ovh-objectstorage

Creative Commons Attribution Share Alike 4.0 International
12 stars 11 forks source link

Cannot user container name with uppercase #21

Closed kr3niu closed 2 years ago

kr3niu commented 3 years ago

I cannot use any method in obejcts() Each method check if container exists, it calls exists(container). This method return that container doesn't exists, but it's not true. My container name contains uppercase, but method toSlug replace upper case with down case. So my URL to container name is invalid.

I suggest to remove str = str.toLowerCase(); in 14 lines of loadsh.js. I can prepare PR

JordiRos commented 3 years ago

I cannot use any method in obejcts() Each method check if container exists, it calls exists(container). This method return that container doesn't exists, but it's not true. My container name contains uppercase, but method toSlug replace upper case with down case. So my URL to container name is invalid.

I suggest to remove str = str.toLowerCase(); in 14 lines of loadsh.js. I can prepare PR

Please do!

dimer47 commented 2 years ago

Hello @kr3niu & @JordiRos

Sorry for the delay, Thanks for your feedback, I took into account your problem, I added options in the configuration object.

Here is an example:

// options is optionaltrad
  options: {
    slugify : true, // true, by default 
    check_exists: true, // true, by default
  }

I'll let you give me your feedback and in a while I'll close the issue.

dimer47 commented 2 years ago

I close this issue. Hoping that the solution provided satisfies you.