Skip to content

onmove - get file names by ids #21

Open
@FalcoWolff

Description

@FalcoWolff

In my project i use my own backend code to handle refresh/delete/move/rename... requests.
Every operation requires the full path of a file.
For example a delete action GET-Request would look like this https://......../fileHandlerInterface.php?fileName=/home/user1/test.txt&op=delete.
As a gui i used your code and it worked pretty well, until i started working with the move event.
It gives the user the srcpath, which is an array (not a folder object!).
And the moved files as an array of ids.
I tried everything to parse the ids into the correct format, but failed.
Can you help me?

my code:

onmove: function(moved, srcpath, srcids, destfolder) {
                    
	var sourcepath = "";

	srcpath.forEach(element => {
		sourcepath += element[1];
	});
                    
                    
	var destpath = dataContainer.buildAbsolutePath(destfolder);//own function creates absolute path from folder object

	console.log("onmove {sourcepath: " + sourcepath + " srcids: " + srcids + " destfolder: " + destpath + "}");

	moved("Server/Network error");

},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions