Comments (5)
You can use the following to get your file:
var nodes = megaApiClientInstance.GetNodes();
var root = nodes.Single(n.Type == NodeType.Root);
var level1 = megaApiClientInstance.GetNodes(root).Single(n => n.Type == NodeType.Folder && n.Name == "folder");
var level2 = megaApiClientInstance.GetNodes(level1).Single(n => n.Type == NodeType.Folder && n.Name == "somefolder");
var level3 = megaApiClientInstance.GetNodes(level2).Single(n => n.Type == NodeType.Folder && n.Name == "somefolder2");
var file = megaApiClientInstance.GetNode(level3).Single(n => n.Type == NodeType.File && n.Name == "somefile.file");
If your file has an unique name, another way is to request it directly
var file = megaApiClientInstance.GetNodes().Single(n => n.Type == NodeType.File && n.Name == "somefile.file");
(it works because mega.nz stores all files/folders in a flat list and GetNodes()
methods returns all nodes.)
from megaapiclient.
I don't really understand your question. folder\somefolder\somefolder2\somefile.file is the storage path on your mega account?
from megaapiclient.
Yes it is but its In a different path for each user's mega account, not mine. Example:
user1 file path for download:string Path = folder\somefolder\somefolder2\somefile.file
user2 file path for download: string Path = folder2\somefolder2\somefile2.file
user3 ....
from megaapiclient.
The second worked. I didn't know this method works like this. I think You can fill wiki more. You can give information about how methods works and the usage . Thank you so much. You saved my life 👍
from megaapiclient.
😄 Feel free to contribute and add samples...
from megaapiclient.
Related Issues (20)
- Exception in UploadFile HOT 1
- Problem accessing MEGA API account HOT 3
- Add ability to attach thumbnails to image uploads HOT 1
- Possible To Get Progress On Get Nodes HOT 1
- Add sample to show how to retrieve folder contents recursively from parent folder
- publicly available node AccessDenied, when get info about node HOT 4
- How can I implement functions to collect more metadata?
- Unable to get download link for directory node HOT 2
- Contacts and shared folders support? Usage of owner IDs? Errors with attribute deserialization! HOT 1
- Resolving MEGA Account Blocking Issue When Uploading Files HOT 2
- MegaApiClient error when building Console App to native code HOT 1
- CG.Web.MegaApiClient.MegaApiClient.Login > Unable to cast object of type 'System.Int64' to type 'Newtonsoft.Json.Linq.JArray' HOT 3
- Problem with LoginAnonymous()
- What is the difference between `Task.Delay(retryDelay).Wait()` and `Thread.Sleep(retryDelay)` HOT 3
- Unable to load nodes due to too much memory consumption. HOT 4
- Attribute deserialization failed: Unexpected character encountered while parsing value: HOT 1
- Not returning new created folders HOT 4
- MegaApiClient is now in passive maintenance mode HOT 1
- Name is coming as NULL for files uploaded using 'CreateFileRequest'
- Erro DeleteAsync HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from megaapiclient.