{"action":"created","issue":{"url":"https://api.github.com/repos/meganz/sdk/issues/611","repository_url":"https://api.github.com/repos/meganz/sdk","labels_url":"https://api.github.com/repos/meganz/sdk/issues/611/labels{/name}","comments_url":"https://api.github.com/repos/meganz/sdk/issues/611/comments","events_url":"https://api.github.com/repos/meganz/sdk/issues/611/events","html_url":"https://github.com/meganz/sdk/issues/611","id":219672629,"number":611,"title":"[Java] Getting public links","user":{"login":"Neeqstock","id":15343295,"avatar_url":"https://avatars3.githubusercontent.com/u/15343295?v=3","gravatar_id":"","url":"https://api.github.com/users/Neeqstock","html_url":"https://github.com/Neeqstock","followers_url":"https://api.github.com/users/Neeqstock/followers","following_url":"https://api.github.com/users/Neeqstock/following{/other_user}","gists_url":"https://api.github.com/users/Neeqstock/gists{/gist_id}","starred_url":"https://api.github.com/users/Neeqstock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neeqstock/subscriptions","organizations_url":"https://api.github.com/users/Neeqstock/orgs","repos_url":"https://api.github.com/users/Neeqstock/repos","events_url":"https://api.github.com/users/Neeqstock/events{/privacy}","received_events_url":"https://api.github.com/users/Neeqstock/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-05T18:23:16Z","updated_at":"2017-04-05T22:20:42Z","closed_at":null,"body":"Hello,  \r\nI'm developing a Java app in which I need to get the public links for the files in my MEGA cloud, to let other people download them.\r\n\r\nThe problem is that until I generate the link via _right-click+\"get link\"_ in the browser for each file, the method _MegaNode.getPublicLink()_ returns \"null\".  \r\n\r\nSince in my cloud there are a lot of file and there will be more in the future, I cannot manually generate them all, I would become mad :). So, my question is:  \r\nis there a way to automatically generate the links for all the files?  \r\nOr is there another workaround for my issue?  \r\n  \r\nThanks for your support."},"comment":{"url":"https://api.github.com/repos/meganz/sdk/issues/comments/292014243","html_url":"https://github.com/meganz/sdk/issues/611#issuecomment-292014243","issue_url":"https://api.github.com/repos/meganz/sdk/issues/611","id":292014243,"user":{"login":"javiserrano","id":5003542,"avatar_url":"https://avatars0.githubusercontent.com/u/5003542?v=3","gravatar_id":"","url":"https://api.github.com/users/javiserrano","html_url":"https://github.com/javiserrano","followers_url":"https://api.github.com/users/javiserrano/followers","following_url":"https://api.github.com/users/javiserrano/following{/other_user}","gists_url":"https://api.github.com/users/javiserrano/gists{/gist_id}","starred_url":"https://api.github.com/users/javiserrano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiserrano/subscriptions","organizations_url":"https://api.github.com/users/javiserrano/orgs","repos_url":"https://api.github.com/users/javiserrano/repos","events_url":"https://api.github.com/users/javiserrano/events{/privacy}","received_events_url":"https://api.github.com/users/javiserrano/received_events","type":"User","site_admin":false},"created_at":"2017-04-05T22:20:42Z","updated_at":"2017-04-05T22:20:42Z","body":"Hello,\r\n`MegaNode.getPublicLink()` only returns public links for already exported nodes.\r\nTo get a public link of a node that has not been exported yet, you should use the C++ function `MegaApi::exportNode`. So, in your case, `MegaApiJava::exportNode`, `MegaApiSwig::exportNode` or `MegaApiAndroid::exportNode` depending on your platform.\r\n\r\nYou can also use that function with already exported nodes. The only inconvenience is that it's an asynchronous function (you have to get the result in the `onRequestFinish` callback) because it's needed to access the network if the node is not exported yet."}}
{"actor":{"display_login":"javiserrano"}}