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
Uploading files to a folder after getting it's download link makes them inaccessible using the download link
Actual Behavior:
The files in the folder are listed as 'undecrypted file' and can't be accessed
Expected Behavior:
The files are accessible
Steps to Reproduce:
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using CG.Web.MegaApiClient;
namespace App
{
class Program
{
static void Main()
{
MegaApiClient client = new MegaApiClient();
client.Login("...", "...");
IEnumerable<INode> nodes = client.GetNodes();
INode rootNode = null;
foreach (INode node in nodes)
{
if (node.Type == NodeType.Root)
{
rootNode = node;
break;
}
}
INode folder1 = client.CreateFolder("folder1", rootNode);
string link = client.GetDownloadLink(folder1).AbsoluteUri;
for (int i = 1; i <= 3; ++i)
{
string file = String.Format("File{0}.txt", i);
using (MemoryStream str = new MemoryStream(Encoding.UTF8.GetBytes(file)))
{
INode fileNode = client.Upload(str, file, folder1);
Console.WriteLine("Uploaded {0} as mega id {1}, fileData is {2}/{3} bytes", file, fileNode.Id, file.Length, fileNode.Size);
}
}
Console.WriteLine("Uploaded to folder {0}", link);
}
}
}
Accessing the folder link shows undecrypted files. You can access them by loggng in to the Mega site, but not by visiting the folder link in a browser.
This doesn't happen using Mega's site if you create a folder, get a link, then upload files to that folder
MegaApiClient Version:
1.10.3
The text was updated successfully, but these errors were encountered:
It's a known limitation and I actually don't know how it can be fixed.
The workaround is to call GetDownloadLink() after the uploads to have all the files accessible
Description:
Uploading files to a folder after getting it's download link makes them inaccessible using the download link
Actual Behavior:
The files in the folder are listed as 'undecrypted file' and can't be accessed
Expected Behavior:
The files are accessible
Steps to Reproduce:
Accessing the folder link shows undecrypted files. You can access them by loggng in to the Mega site, but not by visiting the folder link in a browser.
This doesn't happen using Mega's site if you create a folder, get a link, then upload files to that folder
MegaApiClient Version:
1.10.3
The text was updated successfully, but these errors were encountered: