I’m working on the Custom Properties app and need to test some APIs. However, I’m not able to test them directly from my code. I believe this might need to be done from the server side. Can anyone guide me on how to set this up or test it properly?
Hello @Hardik_Patel,
what is it that you want to do exactly?
If you want to test something, you mean to manually debug stuff or use automatic testing? If automatic, E2E or just backend? Why would that need to be done from the sever side?
I will try to help you but unfortunately, I am not clear what I can help you and what you have in mind.
Chris
Hello @christianlupus,
I want to update the API that is used to modify properties in Nextcloud. I tried making the changes directly in the code but was not successful. Based on my research, it seems this can be done from the server side. That’s why I would like to understand how I can update the code properly and test my requirements. I hope this clarifies my point.
I remember your other post as well, so I supected this is some sort of follows-up.
Now we are no longer in the testing but the development and analysis phase. So, sorry, it did not clean the isses (at least for me) completely.
What API are we talking about? Can you give a link/example/documentation/… of the API you have in mind?
I’m working with an app that creates custom properties with the same name, and it works fine in general. However, the main issue arises when a file is copied to another location the custom property values are not carried over to the destination.
From my research, I found that the file copy process uses WebDAV. Now, I want to trigger my function (which stores the custom properties into an array or object in the code) either once the copy process is complete or during the copy itself.
Does you or anyone have an idea of how this can be achieved, or how I can hook into the WebDAV copy process?
The interaction of the server with the web frontend and the sync client is WebDAV, that is true. I have no clue, if the WebDAV supports the properties or if they should be copied over by specification.
Now, this is much more precise in what you might be able to achieve.
There is the OCP\Files\Events\Node\NodeCopiedEvent that might allow you to react on copying of files and folders. You will have to register a listener (a function/class method or yours) that is invoked upon copying of a node. Then, you can copy the parameters over as you see fit.
Does this solve your issue?