I'm trying to do a connector to get a file. I receive the path of the file by args like :
var filePath = args["file"]
If I print this, I get the path correctly. But in the connector I have:
var connector = remote.connect("alfresco");
result = connector.get(args["file"])
and if I made this, this not recognise the path, the status is Error 500. I print the path and I paste like:
result = connector.get("/slingshot/node/content/workspace/SpacesStore/f32afa20-4c73-4e6c-84e4-1c12d5964a95/txt.txt")
... But obvious, I want by args because I want for all the files.
What is my error? This is so strange for me.
For future users that which may have the same problem, my problem was that args send the path with ""
like "http://something"
and if we put get("/slingshot/node/content/workspace/SpacesStore/f32afa20-4c73-4e6c-84e4-1c12d5964a95/txt.txt")
don't have ""
. So, we can put the args on the string and make string.substring(1,string.length-1)
to delete ""
.