Passing "User" to a upload plugin

Hey Dradis-Team,

is there a way to pass the user as argument to an upload-plugin? As far as I can see, the framework “only” passes the path to the file. The uploader I’m currently building checks if all relevant content blocks exist in the project, adds them accordingly, and if the block doesn’t exist, it creates it. But content_service.create_content_block needs a user_id. My workaround at the moment is that it uses a hard coded user_id.

Hey @fabian,

Your Importer should receive a :default_user_id parameter you can use for this. We’re setting it up in the UploadController:

Or for larger jobs that get processed in the background in the UploadJob:


:+1: thanks @etd that’s it