cloudcmd icon indicating copy to clipboard operation
cloudcmd copied to clipboard

feat: Hook upon upload/download

Open drehelis opened this issue 2 years ago • 10 comments

Is it possible to have an option to fire a POST/GET request to an external endpoint after a successful operation?

drehelis avatar Apr 01 '23 16:04 drehelis

Could you please provide more details?

coderaiser avatar Apr 01 '23 16:04 coderaiser

What I'm looking for is an option to be able to upload a file using cloudcmd and upon successful upload operation, to be able to notify an external service to reload/re-read that data dir.

drehelis avatar Apr 01 '23 16:04 drehelis

You can use PUT method of restafary for this purpose.

coderaiser avatar Apr 01 '23 18:04 coderaiser

You can implement this with User Menu,ask if you have any questions on this.

coderaiser avatar Mar 18 '24 05:03 coderaiser

@coderaiser Where can I see an example?

drehelis avatar Mar 18 '24 09:03 drehelis

https://cloudcmd.io/#user-menu https://github.com/coderaiser/cloudcmd/wiki/User-Menu-Cookbook

coderaiser avatar Mar 18 '24 09:03 coderaiser

Using User Menu, means user needs to hit certain key to execute the desired operation? What If I want it automatically for each file I upload or delete?

drehelis avatar Mar 18 '24 10:03 drehelis

Yes it would be better if user download file with User Menu, in this case you will have much more control over the process.

coderaiser avatar Mar 18 '24 14:03 coderaiser

My setup of cloudcmd has the lower menu hidden, User Menu is not used. Is it possible to do this via upload context menu? image

drehelis avatar Mar 18 '24 14:03 drehelis

That's not sounds like a feature that everybody needs, and going to use. Could you show me how API should look like, so you can use it?

coderaiser avatar Mar 18 '24 15:03 coderaiser