{"action":"created","issue":{"url":"https://api.github.com/repos/mdirolf/nginx-gridfs/issues/24","labels_url":"https://api.github.com/repos/mdirolf/nginx-gridfs/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/mdirolf/nginx-gridfs/issues/24/comments","events_url":"https://api.github.com/repos/mdirolf/nginx-gridfs/issues/24/events","html_url":"https://github.com/mdirolf/nginx-gridfs/issues/24","id":811353,"number":24,"title":"More complex queries","user":{"login":"hekevintran","id":151680,"avatar_url":"https://avatars.githubusercontent.com/u/151680?v=3","gravatar_id":"","url":"https://api.github.com/users/hekevintran","html_url":"https://github.com/hekevintran","followers_url":"https://api.github.com/users/hekevintran/followers","following_url":"https://api.github.com/users/hekevintran/following{/other_user}","gists_url":"https://api.github.com/users/hekevintran/gists{/gist_id}","starred_url":"https://api.github.com/users/hekevintran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hekevintran/subscriptions","organizations_url":"https://api.github.com/users/hekevintran/orgs","repos_url":"https://api.github.com/users/hekevintran/repos","events_url":"https://api.github.com/users/hekevintran/events{/privacy}","received_events_url":"https://api.github.com/users/hekevintran/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2011-04-25T21:13:02Z","updated_at":"2015-02-27T16:29:12Z","closed_at":null,"body":"The directive:\r\n\r\ngridfs my_app field=filename type=string;\r\n\r\nqueries the filename field. Is it possible to write a directive that can make a more complex query like:\r\n\r\ndb.fs.files.find({metadata: {original_filename: 'foo.py'}})\r\n\r\nI want a URL that looks like /gridfs/4db5d119d4b2944930000000/foo.py\r\n\r\nThis is because I have it set up such that the files are not uniquely identified by filename. Is it possible to serve something with a pair of fields? Or with fields from the metadata key?\r\n\r\nIf you don't have the filename in the URL, then when the user goes to the URL to download the file, it will have a name different from that with which it was uploaded."},"comment":{"url":"https://api.github.com/repos/mdirolf/nginx-gridfs/issues/comments/76423200","html_url":"https://github.com/mdirolf/nginx-gridfs/issues/24#issuecomment-76423200","issue_url":"https://api.github.com/repos/mdirolf/nginx-gridfs/issues/24","id":76423200,"user":{"login":"RutledgePaulV","id":4924856,"avatar_url":"https://avatars.githubusercontent.com/u/4924856?v=3","gravatar_id":"","url":"https://api.github.com/users/RutledgePaulV","html_url":"https://github.com/RutledgePaulV","followers_url":"https://api.github.com/users/RutledgePaulV/followers","following_url":"https://api.github.com/users/RutledgePaulV/following{/other_user}","gists_url":"https://api.github.com/users/RutledgePaulV/gists{/gist_id}","starred_url":"https://api.github.com/users/RutledgePaulV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RutledgePaulV/subscriptions","organizations_url":"https://api.github.com/users/RutledgePaulV/orgs","repos_url":"https://api.github.com/users/RutledgePaulV/repos","events_url":"https://api.github.com/users/RutledgePaulV/events{/privacy}","received_events_url":"https://api.github.com/users/RutledgePaulV/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T16:29:12Z","updated_at":"2015-02-27T16:29:12Z","body":"I would very much like to see this. My use case is controlling security on assets. Some assets are public and can therefore be served directly out of nginx. Some, however, I want to delegate to my webapp because it does some security checks. If more flexible querying was allowed then I could set a property on the metadata for each file like `isPublic`, and if that's true then serve it from nginx otherwise delegate."}}