Context condition for File Upload component

Would be great to have context conditions on the File Upload button. My use case is that I want to put the File Upload button in a drawer, and have it work if more than one drawer is opened and the user goes back to an earlier drawer. 

This is convoluted and may not work, but I just recently figured out a work around to get a page include to open in a popup window launched by select actions in a search component. (That was a mouth full). This also has a context issue as the search component would not pass the Id into the URL query parameter due to lack of context. I worked around it by having the select action of the search component activate and set a condition on a model and requery the model so that it only had one row of the contact I wanted. I set the query parameter of the page include to the Id of the row in that model. The search component select action would then open the pop up with the page include in it. Now the page include received the intended Id as a query parameter and opens to the corrext record in a pop up. So, you may be able to have the row action activate and set the value of a model condition prior to opening the drawer so that the model only has the record of the id of the target row. Connect the file uploaded to that model. Then, theoretically, the file upload will always be uploading to the correct model. One last step would be to put a model action on your file upload model that would query the original model upon requery because the file uploader only requeries the model it is connected to after upload.

Neat idea. I already have that activate condition and requery when the drawer opens, but I’m doing a Get More query instead of reload because you could have more than one drawer open. However, in this case, it’s actually pretty awful-looking to have more than one drawer open, and  there’s no good use case for it in practice. So, if I used a standard reload, and open more than one drawer, it will just clear out the old drawer, which works okay. I wonder if I could actually run a pre-load snippet that closes all drawers before one opens, just to make it a little cleaner. 

I’m not a snippet guy, but it seems like it should be able to be done.