Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New file checks #27591

Open
cwilby opened this issue Jun 21, 2021 · 5 comments · May be fixed by #50258
Open

New file checks #27591

cwilby opened this issue Jun 21, 2021 · 5 comments · May be fixed by #50258

Comments

@cwilby
Copy link

cwilby commented Jun 21, 2021

Is your feature request related to a problem? Please describe.
I've built a new flow component for media conversion (see here), and would benefit from the following global flow checks:

Describe the solution you'd like

  • A "Path" check so that users can match File events from specific folders
  • A "File Extension" check so that users can match File events with file extensions

Describe alternatives you've considered
I've considered adding and registering checks for just this component, however in my opinion it might be better as a global check in the event NC adds them in the future and mine are duplicated.

@cwilby cwilby added 0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement labels Jun 21, 2021
@szaimen
Copy link
Contributor

szaimen commented Aug 8, 2021

cc @nextcloud/server-triage is this feasible?

@ghost
Copy link

ghost commented Sep 7, 2021

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Ticket or PR with no recent activity label Sep 7, 2021
@cwilby
Copy link
Author

cwilby commented Sep 7, 2021

Change of plan, I'll swing back and submit a POC that can be reviewed/merged. Less effort given everything else going on.

@ghost ghost removed the stale Ticket or PR with no recent activity label Sep 7, 2021
@szaimen szaimen added 2. developing Work in progress feature: workflows and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Sep 15, 2021
@cwilby
Copy link
Author

cwilby commented Sep 16, 2021

Follow progress here: https://github.com/cwilby/server

@cwilby
Copy link
Author

cwilby commented Sep 16, 2021

I added a FileExtension check to apps/workflowengine/lib/Check/FileExtension.php and registered it in the OCA\WorkflowEngine\Manager class.

cwilby@2b4660e

Need to do some testing next, then will decide whether to submit a PR.

Issue: The pathinfo($x, PATHINFO_EXTENSION) method used will return gz for stuff.tar.gz.
Solution:

$fileName = $this->path === null ? '' : basename($this->path);

$fileNamePieces = explode('.', $fileName);

array_shift($fileNamePieces);

return implode('.', $fileNamePieces);

R0Wi added a commit that referenced this issue Jan 18, 2025
* Partially implements #27591

Signed-off-by: Robin Windey <[email protected]>
@R0Wi R0Wi linked a pull request Jan 18, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants