{"action":"created","issue":{"url":"https://api.github.com/repos/VeliovGroup/Meteor-Files/issues/89","repository_url":"https://api.github.com/repos/VeliovGroup/Meteor-Files","labels_url":"https://api.github.com/repos/VeliovGroup/Meteor-Files/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/VeliovGroup/Meteor-Files/issues/89/comments","events_url":"https://api.github.com/repos/VeliovGroup/Meteor-Files/issues/89/events","html_url":"https://github.com/VeliovGroup/Meteor-Files/issues/89","id":157075667,"number":89,"title":"How to get a file names?","user":{"login":"MeDBejoHok","id":5373823,"avatar_url":"https://avatars.githubusercontent.com/u/5373823?v=3","gravatar_id":"","url":"https://api.github.com/users/MeDBejoHok","html_url":"https://github.com/MeDBejoHok","followers_url":"https://api.github.com/users/MeDBejoHok/followers","following_url":"https://api.github.com/users/MeDBejoHok/following{/other_user}","gists_url":"https://api.github.com/users/MeDBejoHok/gists{/gist_id}","starred_url":"https://api.github.com/users/MeDBejoHok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeDBejoHok/subscriptions","organizations_url":"https://api.github.com/users/MeDBejoHok/orgs","repos_url":"https://api.github.com/users/MeDBejoHok/repos","events_url":"https://api.github.com/users/MeDBejoHok/events{/privacy}","received_events_url":"https://api.github.com/users/MeDBejoHok/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-05-26T20:48:25Z","updated_at":"2016-05-27T08:09:26Z","closed_at":null,"body":"Hey. Anybody can tell, how to get the file name and simply insert it into the src? I read the documentation and I'm probably doing something wrong. Because in the collection, I see a lot of things, but I don't see the original file name. \r\n```\r\nPhotosCollection.load(photoLink, {\r\n      fileName: `${id}.png`,\r\n});\r\n```\r\nbut it did not help, files are still named differently.\r\n\r\nWhen I tried to make `ImagesCollection.findOne ({_ id: id}) link ();` I got links to files without the extension. The path to the file at the same time look strange. Something like \r\n`http://localhost:3000/public/photos/photos/Gd99qerb3e4y6Ee3m/original/Gd99qerb3e4y6Ee3m`\r\n\r\nMy collection settings\r\n```\r\nPhotosCollection = new FilesCollection({\r\n    storagePath: process.env.PWD + '/public/photos',\r\n    downloadRoute: '/public/photos',\r\n    collectionName: 'photos',\r\n    allowClientCode: false,\r\n    cacheControl: 'public, max-age=31536000',\r\n    onBeforeUpload(file) {\r\n        if (file.size <= 20971520 && /png|jpg|jpeg/i.test(file.ext)) {\r\n            return true;\r\n            } else {\r\n            return 'Please upload image, with size equal or less than 20MB';\r\n        }\r\n    },\r\n    downloadCallback(fileObj) {\r\n        if (this.params.query.download == 'true') {\r\n            // Increment downloads counter\r\n            PhotosCollection.update(fileObj._id, {$inc: {'meta.downloads': 1}});\r\n        }\r\n        return true;\r\n    }\r\n});\r\n```\r\nI just want to get an array of names of files and display them on the client, it is possible even without a path. I write them by myself ;)"},"comment":{"url":"https://api.github.com/repos/VeliovGroup/Meteor-Files/issues/comments/222086474","html_url":"https://github.com/VeliovGroup/Meteor-Files/issues/89#issuecomment-222086474","issue_url":"https://api.github.com/repos/VeliovGroup/Meteor-Files/issues/89","id":222086474,"user":{"login":"MeDBejoHok","id":5373823,"avatar_url":"https://avatars.githubusercontent.com/u/5373823?v=3","gravatar_id":"","url":"https://api.github.com/users/MeDBejoHok","html_url":"https://github.com/MeDBejoHok","followers_url":"https://api.github.com/users/MeDBejoHok/followers","following_url":"https://api.github.com/users/MeDBejoHok/following{/other_user}","gists_url":"https://api.github.com/users/MeDBejoHok/gists{/gist_id}","starred_url":"https://api.github.com/users/MeDBejoHok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeDBejoHok/subscriptions","organizations_url":"https://api.github.com/users/MeDBejoHok/orgs","repos_url":"https://api.github.com/users/MeDBejoHok/repos","events_url":"https://api.github.com/users/MeDBejoHok/events{/privacy}","received_events_url":"https://api.github.com/users/MeDBejoHok/received_events","type":"User","site_admin":false},"created_at":"2016-05-27T08:09:26Z","updated_at":"2016-05-27T08:09:26Z","body":"Here it is\r\n```\r\n[FilesCollection] [load(https://api.telegram.org/file/bot/photo/file_506.jpg, {\"fileName\":\"d034db0ee99df5b98a6d431e0.png\",\"meta\":{\"post\":\"d034db0ee99df5b98a6d431e\"}}, callback)]\r\n\r\n[FilesCollection] [load(https://api.telegram.org/file/bot/photo/file_508.jpg, {\"fileName\":\"d034db0ee99df5b98a6d431e1.png\",\"meta\":{\"post\":\"d034db0ee99df5b98a6d431e\"}}, callback)]\r\n\r\n[FilesCollection] [load] Received: https://api.telegram.org/file/bot/photo/file_506.jpg\r\n[FilesCollection] [load] [insert] d034db0ee99df5b98a6d431e0.png -> photos\r\n[FilesCollection] [load] Received: https://api.telegram.org/file/bot/photo/file_508.jpg\r\n[FilesCollection] [load] [insert] d034db0ee99df5b98a6d431e1.png -> photos\r\n=> Client modified -- refreshing\r\n```"}}
{"actor":{"display_login":"MeDBejoHok"}}