{"action":"created","issue":{"url":"https://api.github.com/repos/bumptech/glide/issues/902","labels_url":"https://api.github.com/repos/bumptech/glide/issues/902/labels{/name}","comments_url":"https://api.github.com/repos/bumptech/glide/issues/902/comments","events_url":"https://api.github.com/repos/bumptech/glide/issues/902/events","html_url":"https://github.com/bumptech/glide/issues/902","id":127256104,"number":902,"title":"Wrong file extension for SimpleTarget<File> ","user":{"login":"xomyc","id":9446995,"avatar_url":"https://avatars.githubusercontent.com/u/9446995?v=3","gravatar_id":"","url":"https://api.github.com/users/xomyc","html_url":"https://github.com/xomyc","followers_url":"https://api.github.com/users/xomyc/followers","following_url":"https://api.github.com/users/xomyc/following{/other_user}","gists_url":"https://api.github.com/users/xomyc/gists{/gist_id}","starred_url":"https://api.github.com/users/xomyc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xomyc/subscriptions","organizations_url":"https://api.github.com/users/xomyc/orgs","repos_url":"https://api.github.com/users/xomyc/repos","events_url":"https://api.github.com/users/xomyc/events{/privacy}","received_events_url":"https://api.github.com/users/xomyc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bumptech/glide/labels/question","name":"question","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-01-18T16:00:22Z","updated_at":"2016-01-29T20:52:31Z","closed_at":null,"body":"I'm trying to save file, picked by user. With jpegs everything is ok, but if user picks png or gif image, resulting resource name contains extension .0 instead of .png or .gif\r\n\r\nhere is the code:\r\n\r\n```\r\nGlide.with(this).load(photoUri).downloadOnly(new SimpleTarget<File>() {\r\n\r\n                @Override\r\n                public void onResourceReady(File resource, GlideAnimation<? super File> glideAnimation) {\r\n                    pickedPhotoPath = resource.getAbsolutePath();\r\n                    }\r\n            });\r\n```"},"comment":{"url":"https://api.github.com/repos/bumptech/glide/issues/comments/176964961","html_url":"https://github.com/bumptech/glide/issues/902#issuecomment-176964961","issue_url":"https://api.github.com/repos/bumptech/glide/issues/902","id":176964961,"user":{"login":"TWiStErRob","id":2906988,"avatar_url":"https://avatars.githubusercontent.com/u/2906988?v=3","gravatar_id":"","url":"https://api.github.com/users/TWiStErRob","html_url":"https://github.com/TWiStErRob","followers_url":"https://api.github.com/users/TWiStErRob/followers","following_url":"https://api.github.com/users/TWiStErRob/following{/other_user}","gists_url":"https://api.github.com/users/TWiStErRob/gists{/gist_id}","starred_url":"https://api.github.com/users/TWiStErRob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TWiStErRob/subscriptions","organizations_url":"https://api.github.com/users/TWiStErRob/orgs","repos_url":"https://api.github.com/users/TWiStErRob/repos","events_url":"https://api.github.com/users/TWiStErRob/events{/privacy}","received_events_url":"https://api.github.com/users/TWiStErRob/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T20:52:31Z","updated_at":"2016-01-29T20:52:31Z","body":"I gave you two options, you can write any code based on top of that to handle edge cases. You know your urls and types of files. It is possible that appending \".jpg\" to the name is enough for you, or you can even peek at the first few bytes of the file to determine the type with `new ImageHeaderParser(in).getType()` (you'll have to rewind or close and reopen `in` after that!). You may even have some metadata (like mime type or original filename) from the source that gave you `imageUrl`. The question of saving a file with a proper name is really broad, the requirements are up to you."}}