Automattic / knox

S3 Lib
MIT License
1.74k stars 285 forks source link

copy operation does not copy the file permissions #214

Closed nirmelamoud closed 10 years ago

nirmelamoud commented 10 years ago

hi,

trying to copy files I see that the permission of the file is not been copied,

  1. I think it make no sense, if you copy a file, you should leave it with the same file permission.
  2. there is no way to set the permission after the copy (I only found a way to set the permission when you put the file) if thats true than copy operation is useless feature, you can copy a file, but not use it

am I missing something ?

domenic commented 10 years ago

I imagine there are headers you need to pass in order to make this work. This is really an Amazon API issue, not a Knox issue. If you can figure out how to do this with the Amazon API (by e.g. reading their docs), then you can probably do it with Knox.

nirmelamoud commented 10 years ago

I agree but the copy api does not allow me to pass the header , only the put api has a param for the header

On Dec 19, 2013, at 11:04 AM, Domenic Denicola notifications@github.com wrote:

I imagine there are headers you need to pass in order to make this work. This is really an Amazon API issue, not a Knox issue. If you can figure out how to do this with the Amazon API (by e.g. reading their docs), then you can probably do it with Knox.

— Reply to this email directly or view it on GitHub.

domenic commented 10 years ago

Why would you say that? Seems like it has a headers parameter to me. https://github.com/LearnBoost/knox/blob/master/lib/client.js#L501

nirmelamoud commented 10 years ago

hmm

I was looking at the documentation at: https://github.com/LearnBoost/knox#advanced-operations and it is incorrect I guess.

thanks

On Dec 19, 2013, at 11:04 AM, Domenic Denicola notifications@github.com wrote:

I imagine there are headers you need to pass in order to make this work. This is really an Amazon API issue, not a Knox issue. If you can figure out how to do this with the Amazon API (by e.g. reading their docs), then you can probably do it with Knox.

— Reply to this email directly or view it on GitHub.

domenic commented 10 years ago

Well, those examples don't use all available features.