MegaApiClient | Net library to access http //mega.co.nz / http | Form library
kandi X-RAY | MegaApiClient Summary
kandi X-RAY | MegaApiClient Summary
[License] Documentation is available on [
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of MegaApiClient
MegaApiClient Key Features
MegaApiClient Examples and Code Snippets
Community Discussions
Trending Discussions on MegaApiClient
QUESTION
Hi i have problem with permission(i think). Im trying to download a file from Mega.nz by MegaApiClient and when it trying to do that that problem appears: "System.UnauthorizedAccessException: Access to the path '/storage/emulated/0/Download' is denied."
so i was trying different ways to do that like changing path folder or just simple create new file and write all content to that new file but nothing works. of course i have permission added in AndroidManifest.xml
...ANSWER
Answered 2019-Apr-21 at 19:44The problem probably occurs since your device / emulator on which you test your App has API 23 or higher. This means that the manifest permissions are not enough and you need to add runtime permissions asking for writing files.
This link will explain it using xamarin and this is the official documentation.
A runtime permission basically displays the user a dialog which lets him decide whether or not the App is allowed to access for instance the internal storage of the device.
Oh and this article will also help you implementing it.
QUESTION
I want to implement a simple way for a user to upload a save file (a really simple json file with no personal information) to their cloud account. The main problem is that dropbox, google drive etc... don't work with simple username and password, they need OAuth 2, and a browser for log in. But it's not easy to implement that in a Unity game, and it require that I set up a secret API key connected to my account (with limited put and get possible without pay). I want to be able to use the final user account to upload 1 single json file to the user account, and be able to download it from another device (that's the only reason why I want to be able to log in... without log in I can use something like htput, jsonblob or myjson... but if I want the user to be able to get their save in another device I would need that they copy a really long and not easy keyurl generated by those services).
I saw that with MegaApiClient it should be possible. I imported it into Unity as a native Plugin and I was able to use it in my code.
Problem is that I cannot Login because I get an error:
TlsException: Invalid certificate received from server
the code I use it the one in the example:
...ANSWER
Answered 2018-Jul-16 at 18:16In the end I decided to go with Dropbox. It's easier than I expected, but you will need to use the code flow with copy/paste (you cannot use the redirect_uri, at least I don't know how to redirect to the app on all platforms).
I don't know how to solve the mega problem.
EDIT. With Unity 2018.2 now MegaApi works.
QUESTION
I'm trying to implement a multiple download function, that would fire and download like 10 files at the same time.
I implemented the IProgress interface too to let me know what's the progress for that.
What I need now is a simple counter inside each of them to say: this is download #1, this is download #2, etc..
I can't do a normal counter since they may all run at the same time and update the counter before me using/storing the value, causing me to have a wrong value or the same value for many of them.
I've looked into the Interlocked class, but I'm just not able to find a suitable implementation for that, that would store a specific number for a each async dynamic function that is triggered.
I'm using the number to store the progress in an array, so I'll just call like:
...ANSWER
Answered 2018-Jun-18 at 14:49I don't know if I fully understand your question, but I'll give it a shot. If I understand correctly, you are asking for an integer to be assigned to a request for tracking purposes right? I've done this before while doing a bit of stress testing and sends the requests out in waves of 100. The code looked a little like this:
QUESTION
i am new in C# and this is the first time to me to use this API
i am trying to upload file to me mega Account by C# App
and i succeed in upload but without any progress bar
and the API has this method "UploadFileAsync" but i cant understand every parameter in this method
this is from Object browser in VS
IMegaApiClient.UploadFileAsync(string, CG.Web.MegaApiClient.INode, System.IProgress, System.Threading.CancellationToken?)
System.Threading.Tasks.Task UploadFileAsync(string filename, CG.Web.MegaApiClient.INode parent, System.IProgress progress, [System.Threading.CancellationToken? cancellationToken = null]) Member of CG.Web.MegaApiClient.IMegaApiClient
i know filename and INode parent but what should i write in "System.IProgress progress" and cancellationToken
...ANSWER
Answered 2018-May-22 at 03:10System.IProgress
is an interface used so that we can write custom progress types and interchange then with the ones built in. It has one method Report(T)
where T
is an anonymous type.
This means you can write your own progress class but there is one already written in .NET that has that interface and since it qualifies let's use that one. It found in the same namespace as IProgress
and is Progress
and comes with a handy built in ProgressChanged
event we can listen for. So in this first step code example I only introduce the progress. Notice I replaced ProgressBar
with the progress
variable in code.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install MegaApiClient
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page