Question

I'm looking to use the File plugin to upload the files needed by the plugin I'm developing. I'd just add a specific tag to the files uploaded from my plugin, thanks to a hook.

At least that's how I wanted things to work, but I can't find any hook that would help me do that, so here comes my question:

Is there a plugin hook I could use to modify a file being uploaded using /mod/file?

If there isn't, I'd be glad to hear about any other way I could achieve what I want.

Was it helpful?

Solution

Sorry, I didnt understand your requirements correctly.

If you want to upload a file through a different plugin, use the core file upload action with in your plugin's upload action. You can then listen to an object create event and then add necessary metadata with the uploaded file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top