On occasion, there is a need for a subset of files to be present on the lower environments for testing purposes. It would be great to have a VBO action for file and media entities, which would allow to selectively download managed files.
Issue fork stage_file_proxy-3615519
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
euk commentedOk. I added a MR for the 3.x version. Here is what it does:
The Stage File Proxy: Download files action downloads selected managed files from the configured Stage File Proxy origin. It can be applied to File entities and to Media entities whose configured source field references managed files. Files using a scheme other than
public://cannot be downloaded by the action.The action is a Drupal core action and does not require Views Bulk Operations. When Views Bulk Operations is installed, the action can be added to File or Media views so that an administrator can download only the selected entities.
The action provides the following options:
stage_file_proxylog channel.For logging, file-level entries use the following severities:
When Enable debug logging is selected, the action also writes DEBUG (7) entries for Media entities. These entries are informational and describe cases such as a Media entity having no managed source file and the final per-Media download summary. The debug option does not suppress the file-level entries listed above.
NOTE: The logging levels were update for the download manager as well, to be in sync with the action.
Comment #4
smustgrave commentedJust an fyi when AI is used it needs to be disclosed https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquett...
No issue doing that but just need to mention.
MR seems to be full of little AI only stuff that won't fully be needed. Will have to sit down in a week or so and find them all.
Going to need test coverage
Comment #5
euk commentedAh, right! I was in a hurry, looked over but did not fully clean it up. Let me work on that and make it human.
Comment #6
smustgrave commentedMuch appreciated. I should have also started with +1 to the feature. Can see others using it
Comment #7
euk commentedNo worries. I will review, cleanup and disclose what is needed.