public object AzureFileoperations([FromBody] FileManagerDirectoryParams args)
        {
            if (args.Path != "")
            {
                string startPath    = "<--blobPath-->";
                string originalPath = ("<--filePath-->").Replace(startPath, "");
                //-----------------
                // for example
                //string startPath = "https://azure_service_account.blob.core.windows.net/files/";
                //string originalPath = ("https://azure_service_account.blob.core.windows.net/files/Files").Replace(startPath, "");
                //-------------------

                args.Path       = (originalPath + args.Path).Replace("//", "/");
                args.TargetPath = (originalPath + args.TargetPath).Replace("//", "/");
            }
            switch (args.Action)
            {
            case "read":
                // reads the file(s) or folder(s) from the given path.
                return(Json(this.ToCamelCase(this.operation.GetFiles(args.Path, args.Data))));

            case "delete":
                // deletes the selected file(s) or folder(s) from the given path.
                return(this.ToCamelCase(this.operation.Delete(args.Path, args.Names, args.Data)));

            case "details":
                // gets the details of the selected file(s) or folder(s).
                return(this.ToCamelCase(this.operation.Details(args.Path, args.Names, args.Data)));

            case "create":
                // creates a new folder in a given path.
                return(this.ToCamelCase(this.operation.Create(args.Path, args.Name)));

            case "search":
                // gets the list of file(s) or folder(s) from a given path based on the searched key string.
                return(this.ToCamelCase(this.operation.Search(args.Path, args.SearchString, args.ShowHiddenItems, args.CaseSensitive, args.Data)));

            case "rename":
                // renames a file or folder.
                return(this.ToCamelCase(this.operation.Rename(args.Path, args.Name, args.NewName, false, args.Data)));

            case "copy":
                // copies the selected file(s) or folder(s) from a path and then pastes them into a given target path.
                return(this.ToCamelCase(this.operation.Copy(args.Path, args.TargetPath, args.Names, args.RenameFiles, args.TargetData, args.Data)));

            case "move":
                // cuts the selected file(s) or folder(s) from a path and then pastes them into a given target path.
                return(this.ToCamelCase(this.operation.Move(args.Path, args.TargetPath, args.Names, args.RenameFiles, args.TargetData, args.Data)));
            }
            return(null);
        }
        public ActionResult AzureUpload(FileManagerDirectoryParams args)
        {
            if (args.Path != "")
            {
                string startPath    = "<--blobPath-->";
                string originalPath = ("<--filePath-->").Replace(startPath, "");
                args.Path = (originalPath + args.Path).Replace("//", "/");
                //----------------------
                //for example
                //string startPath = "https://azure_service_account.blob.core.windows.net/files/";
                //string originalPath = ("https://azure_service_account.blob.core.windows.net/files/Files").Replace(startPath, "");
                //args.Path = (originalPath + args.Path).Replace("//", "/");
                //----------------------
            }

            operation.Upload(args.Path, args.UploadFiles, args.Action, args.Data);
            return(Json(""));
        }
 public IActionResult AzureGetImage(FileManagerDirectoryParams args)
 {
     return(this.operation.GetImage(args.Path, args.Id, true, null, args.Data));
 }
        public object AzureDownload(string downloadInput)
        {
            FileManagerDirectoryParams args = JsonConvert.DeserializeObject <FileManagerDirectoryParams>(downloadInput);

            return(operation.Download(args.Path, args.Names, args.Data));
        }