You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im not really familiar with c++ , so i have been using chatgpt to help me make a script that will get a temporary link of a folder that last 1 hour, so this is what i got:
int main(int argc, char argv[])
{
// Initialize the MegaApi object
mega::MegaApi megaApi = new mega::MegaApi(NULL, "APIKEY");
// Login to your account
megaApi->login("MAIL", "PASS");
megaApi->fetchNodes();
// Get a handle for the folder you want to share
mega::MegaNode *folderNode = megaApi->getNodeByPath("FOLDERPATH");
if(folderNode==NULL)
{
std::cout<<"Folder not found"<<std::endl;
return 1;
}
// Get a public link for the folder
megaApi->getPublicLinks(folderNode);
mega::MegaStringMap *links = megaApi->getPublicLinks(folderNode);
std::string exportLink = links->get("0");
// Print the link
std::cout << "Public Link for the folder: " << exportLink << std::endl;
// Clean up
delete megaApi;
return 0;
}
I have been getting this error on line 22 and 23 : invalid conversion from 'mega::MegaNode*' to 'int' [-fpermissive]|
If anyone can help me , or just give me anyother way to automate getting temporary links from Mega , would be awesome
The text was updated successfully, but these errors were encountered:
Im not really familiar with c++ , so i have been using chatgpt to help me make a script that will get a temporary link of a folder that last 1 hour, so this is what i got:
#include "C:\Users\Uros\Downloads\sdk-master\sdk-master\include\megaapi.h"
#include
int main(int argc, char argv[])
{
// Initialize the MegaApi object
mega::MegaApi megaApi = new mega::MegaApi(NULL, "APIKEY");
}
I have been getting this error on line 22 and 23 : invalid conversion from 'mega::MegaNode*' to 'int' [-fpermissive]|
If anyone can help me , or just give me anyother way to automate getting temporary links from Mega , would be awesome
The text was updated successfully, but these errors were encountered: