Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example for moving files #2

Closed
tmcw opened this issue Dec 8, 2010 · 6 comments
Closed

Add example for moving files #2

tmcw opened this issue Dec 8, 2010 · 6 comments

Comments

@tmcw
Copy link

tmcw commented Dec 8, 2010

It's relatively simple to move files with knox, but it requires you to set Content-Length: 0 so that nodejs doesn't send a Transfer-Encoding header to S3, which will make S3 501.

Adding some documentation for this might save people some time:

client.put('0/0/0.png', {
    'Content-Type': 'image/jpg',
    'Content-Length': '0',
    'x-amz-copy-source': '/test-tiles/0/0/0.png',
    'x-amz-metadata-directive': 'REPLACE'
}).on('response', function(res) {

}).end();
@tj
Copy link
Contributor

tj commented Dec 8, 2010

Added moving file example. Closed by 3ee6fcf

@tj
Copy link
Contributor

tj commented Dec 8, 2010

thanks :)

@rauchg
Copy link
Contributor

rauchg commented Dec 8, 2010

Should we maybe have a move higher-level method?

@tmcw
Copy link
Author

tmcw commented Dec 10, 2010

Possibly; along with list for sure, down the line, although the lack of a good xml library for node makes that area a little shaky for now.

@tj
Copy link
Contributor

tj commented Dec 10, 2010

yeah sucks they dont have a json api

@tmcw
Copy link
Author

tmcw commented Dec 10, 2010

Rather cruddy implementation of a listbucket method, fwiw: https://gist.github.com/736504

kristianmandrup pushed a commit to kristianmandrup/knox that referenced this issue Apr 10, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants