Closed (fixed)
Project:
S3 File System
Version:
7.x-2.2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Sep 2015 at 15:00 UTC
Updated:
25 Sep 2015 at 17:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
captone commentedComment #3
coredumperror commentedSounds like a useful enough feature. I'll go ahead and add it into the next dev build.
Be wary, though: if you're storing the username in the URL like that, page caching will break the logging, as only the first user to load the page will have their username appear in the URL. Every subsequent user will see the exact same URL as the first user does, until the page's cache entry gets reset.
Comment #4
coredumperror commentedAlright, here's my take on your feature request. I generalized it even further, to allow any custom GET argument. And since there are now three places in the code adding optional GET args to the S3 URLs, I refactored them into a function.
Note that you now need to include the "x-" in your hook code, since s3fs won't add it for you.
If this works for you, please let me know so I can push it to git and add it to the dev build.
Comment #5
coredumperror commentedWhoops, that patch has the wrong file paths in it. Here's the corrected patch.
Comment #6
captone commentedThanks for reworking the idea and building cache safe code. It works fine.
I simply wonder if it's reasonnable to accept any parameter instead of forcing the 'x-' prefix. AWS S3 REST interface is not defined as accepting any parameter, so it may break in the future.
Comment #7
coredumperror commentedI made it completely generic so that some other enterprising module author could add support for something that s3fs doesn't currently support. There are plenty of other GET args that can be added to S3 URLs which s3fs doesn't use.