-
Notifications
You must be signed in to change notification settings - Fork 105
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
Is there a possibility to save just the key to the DB? #11
Comments
Currently the only way is to parse it our of the URL. var parser = document.createElement('a');
parser.href = url;
var key = parser.pathname; Will look into making this easier in a future release. |
Is this for a CDN? |
Ok. Thank you!
In the future I would like to use AWS Lambda to resize images. But to work with AWS Lambda I need 2 buckets and I need to save just the key name without the extra stuff. So I can switch buckets. |
OK, I will expose an API for accessing that information. |
Actually there is already a better way than above to obtain the key, albeit cumbersome: var key = _.findWhere(uploader.instructions.postData, {name: "key"}).value; |
Perfect, I tried the code and it works! But as you said, it's a little bit cumbersome. Thank you! |
How is this working now? Is this correct (I couldn't try it yet)? var key = uploader.param('key'); |
yes, that's correct. |
For some reason I can't get it to work. uploader.instructions is undefined and uploader.param('key') is not returning anything either. What am I missing ?
|
How can I save just the key without the scheme, bucket name and S3 domain name?
The text was updated successfully, but these errors were encountered: