Comments (9)
Command execution for created folders,
should work already
I can't see such trigger and it doesn't work for me with "File created"
You can limit the file type to directory. Unless your intention was to work on the parent directory of the affected file? This at least to some degree can be handled by the script called, but it could be done nicer of course.
That is OK. I want to detect both new files and directories and I have no problem with getting things like parent directory in script. Problem is that script is not triggered for new directories at all. I will try it again with new version.
Better path variable support for Local External Storages?
would you elaborate her as well?
User has external storage of type local:
/home/userName
mounted as/
,
but for%n
I get path like/userName/files/folderName/fileName.txt
, which is not very handy.
Edit:%f
does not work either and I don't like use oftoTmpFile
there.
%n
is doing it correctly.%f
is broken yet, but will see a fix with the upcoming release (planned tomorrow).
Perfect, I will test it then.
You should see the absolute path in your case (expectation, I did not double check), the example temp name is expected when the file is taken from an external external(sic!) storage.
Temp for external external (:D) storages makes sense.
from workflow_script.
%n
should not return an absolute path when it is within the data directory. This is different for you?I have external local storage mounted as /, so it is specific case and I got full path for
%n
.
It could be useful to haveusername/files/path
accessible via%n
for something likeocc files:scan --path ...
call.
Yes, agreed.
Script is not triggered by directory creation.
Indeed, we are excluding folders. I would really love to answer you why, but this was like this since the very beginning, about two years ago, with the initial commit. Later one acutally a Folder is beign taken into consideration. So we may remove it. A quick smoke test went fine.
To unlock folders, the change is tiny:diff --git a/lib/Operation.php b/lib/Operation.php index 649d21f..40dfe7d 100644 --- a/lib/Operation.php +++ b/lib/Operation.php @@ -142,7 +142,7 @@ class Operation implements ISpecificOperation { // '', admin, 'files', 'path/to/file.txt' [, , $folder,] = explode('/', $node->getPath(), 4); - if ($folder !== 'files' || $node instanceof Folder) { + if ($folder !== 'files') { return; }Maybe you want to try it out?
Perfect! This works just fine.
👍
from workflow_script.
Command execution for created folders,
should work already
Filtering by operation,
what do you mean?
Better path variable support for Local External Storages?
would you elaborate her as well?
from workflow_script.
Command execution for created folders,
should work already
I can't see such trigger and it doesn't work for me with "File created"
Filtering by operation,
what do you mean?
There was probably no "When" for selecting triggers whet I raised this issue?
Better path variable support for Local External Storages?
would you elaborate her as well?
User has external storage of type local: /home/userName
mounted as /
,
but for %n
I get path like /userName/files/folderName/fileName.txt
, which is not very handy.
Edit: %f
does not work either and I don't like use of toTmpFile
there.
from workflow_script.
Command execution for created folders,
should work already
I can't see such trigger and it doesn't work for me with "File created"
You can limit the file type to directory. Unless your intention was to work on the parent directory of the affected file? This at least to some degree can be handled by the script called, but it could be done nicer of course.
Filtering by operation,
what do you mean?
There was probably no "When" for selecting triggers whet I raised this issue?
Possible. So, that's solved :)
Better path variable support for Local External Storages?
would you elaborate her as well?
User has external storage of type local:
/home/userName
mounted as/
,
but for%n
I get path like/userName/files/folderName/fileName.txt
, which is not very handy.
Edit:%f
does not work either and I don't like use oftoTmpFile
there.
%n
is doing it correctly. %f
is broken yet, but will see a fix with the upcoming release (planned tomorrow). You should see the absolute path in your case (expectation, I did not double check), the example temp name is expected when the file is taken from an external external(sic!) storage.
from workflow_script.
I tested 1.5.1 version:
- Both
%n
and%f
now contain full filesystem path for local storage, which works for me, but I don't know if it is intended behavior for%n
. - Script is not triggered by directory creation.
from workflow_script.
%n
should not return an absolute path when it is within the data directory. This is different for you?
Script is not triggered by directory creation.
Indeed, we are excluding folders. I would really love to answer you why, but this was like this since the very beginning, about two years ago, with the initial commit. Later one acutally a Folder is beign taken into consideration. So we may remove it. A quick smoke test went fine.
To unlock folders, the change is tiny:
diff --git a/lib/Operation.php b/lib/Operation.php
index 649d21f..40dfe7d 100644
--- a/lib/Operation.php
+++ b/lib/Operation.php
@@ -142,7 +142,7 @@ class Operation implements ISpecificOperation {
// '', admin, 'files', 'path/to/file.txt'
[, , $folder,] = explode('/', $node->getPath(), 4);
- if ($folder !== 'files' || $node instanceof Folder) {
+ if ($folder !== 'files') {
return;
}
Maybe you want to try it out?
from workflow_script.
%n
should not return an absolute path when it is within the data directory. This is different for you?
I have external local storage mounted as /, so it is specific case and I got full path for %n
.
It could be useful to have username/files/path
accessible via %n
for something like occ files:scan --path ...
call.
Script is not triggered by directory creation.
Indeed, we are excluding folders. I would really love to answer you why, but this was like this since the very beginning, about two years ago, with the initial commit. Later one acutally a Folder is beign taken into consideration. So we may remove it. A quick smoke test went fine.
To unlock folders, the change is tiny:
diff --git a/lib/Operation.php b/lib/Operation.php index 649d21f..40dfe7d 100644 --- a/lib/Operation.php +++ b/lib/Operation.php @@ -142,7 +142,7 @@ class Operation implements ISpecificOperation { // '', admin, 'files', 'path/to/file.txt' [, , $folder,] = explode('/', $node->getPath(), 4); - if ($folder !== 'files' || $node instanceof Folder) { + if ($folder !== 'files') { return; }Maybe you want to try it out?
Perfect! This works just fine.
from workflow_script.
I think there is nothing left open here.
from workflow_script.
Related Issues (20)
- %n parameter is broken on GROUP FOLDERS HOT 3
- Add Support for nextcloud 24 HOT 8
- Does the App follow semantic versioning? HOT 3
- add support für Nextcloud 25 HOT 2
- Fix lang resource not appearing on Transifex please HOT 2
- NC 24.x to 25.0.2,25.0.3,25.0.4 HOT 3
- Replace lint.yml with split workflows
- ffmpeg throwing "Invalid data found when processing input" HOT 3
- Update to 1.11.0: Failed opening required '/PATH/apps/workflow_script/composer/../vendor/autoload.php' in occ
- Adding a watermark to PDF files in Nextcloud HOT 1
- placeholder %i is not replaced because of wrong replacement of %s HOT 1
- Only 5 Tags available for Tag trigger HOT 1
- View::getLocalFolder() was removed HOT 1
- error when updating from 20.0.2 to 20.0.14 HOT 1
- Script is not executed with automatically assigned keyword HOT 1
- Add scripts management UI
- `shell_exec(): Unable to execute` HOT 2
- Just some question about the app… HOT 1
- [Feature request] Add display name as placeholder HOT 2
- Failed to update nextcloud/ocp package on branch stable28
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from workflow_script.