Skip to content

imagemagick convert script doesn't work #62

Open

Description

@sebstrgg

Steps to reproduce

  1. Install external scripts
  2. Add automated tagging to uploaded files
  3. Run the command 'convert %x -interlace plane -strip -quality 80 -resize 1000x1000> $(basename %x)_1.jpg' on files that are tagged accordingly to step 2.

Expected behaviour

Image files should be converted according to command settings and have it's original name with the suffix '_1'. This works properly when the command is run directly at the server.

Actual behaviour

Nothing happens at all - flow log is empty. The automated tagging applies, but not the external script.

Workflow Script app

Workflow Script app version: 1.4.0

Server configuration

Operating system: Ubuntu Server 20.04 LTS

Web server: Nginx

Database: MariaDB 10.3.22

PHP version: 7.4.3

Nextcloud Version: 19.0.3

Where did you install Nextcloud from: Nextcloud

Signing status:

No errors have been found.

List of activated apps:

Details ``` Enabled: - accessibility: 1.5.0 - activity: 2.12.0 - admin_audit: 1.9.0 - analytics: 2.5.0 - bruteforcesettings: 2.0.1 - cloud_federation_api: 1.2.0 - contactsinteraction: 1.0.0 - dav: 1.15.0 - federatedfilesharing: 1.9.0 - files: 1.14.0 - files_automatedtagging: 1.9.0 - files_external: 1.10.0 - files_rightclick: 0.16.0 - files_sharing: 1.11.0 - files_trashbin: 1.9.0 - files_versions: 1.12.0 - logreader: 2.4.0 - lookup_server_connector: 1.7.0 - metadata: 0.12.0 - notifications: 2.7.0 - oauth2: 1.7.0 - password_policy: 1.9.1 - provisioning_api: 1.9.0 - serverinfo: 1.9.0 - settings: 1.1.0 - sharebymail: 1.9.0 - systemtags: 1.9.0 - text: 3.0.1 - theming: 1.10.0 - theming_customcss: 1.6.0 - twofactor_backupcodes: 1.8.0 - updatenotification: 1.9.0 - viewer: 1.3.0 - workflow_script: 1.4.0 - workflowengine: 2.1.0 ```

Nextcloud configuration:

Details ``` "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "***REMOVED SENSITIVE VALUE***" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "19.0.3.1", "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "activity_expire_days": 14, "auth.bruteforce.protection.enabled": true, "blacklisted_files": [ ".htaccess", "Thumbs.db", "thumbs.db" ], "cron_log": true, "enable_previews": true, "enabledPreviewProviders": [ "OC\\Preview\\PNG", "OC\\Preview\\JPEG", "OC\\Preview\\GIF", "OC\\Preview\\BMP", "OC\\Preview\\XBitmap", "OC\\Preview\\Movie", "OC\\Preview\\PDF", "OC\\Preview\\MP3", "OC\\Preview\\TXT", "OC\\Preview\\MarkDown" ], "filesystem_check_changes": 0, "filelocking.enabled": "true", "htaccess.RewriteBase": "\/", "integrity.check.disabled": false, "knowledgebaseenabled": false, "logfile": "\/var\/nc_data\/nextcloud.log", "loglevel": 2, "logtimezone": "Europe\/Stockholm", "log_rotate_size": 104857600, "maintenance": false, "memcache.local": "\\OC\\Memcache\\APCu", "memcache.locking": "\\OC\\Memcache\\Redis", "overwriteprotocol": "https", "preview_max_x": 1024, "preview_max_y": 768, "preview_max_scale_factor": 1, "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "timeout": 0 }, "quota_include_external_storage": false, "share_folder": "\/Shares", "skeletondirectory": "\/var\/www\/nextcloud\/default-files", "theme": "", "trashbin_retention_obligation": "auto, 7", "updater.release.channel": "stable" ```

Are you using external storage, if yes which one: Testing on Local but the plan is to have this applied on files in external storage (SMB)

Are you using encryption: no

Server log (data/nextcloud.log)

Details ``` Insert your server log here ```

Activity

  1. bruderb commented on Oct 20, 2020

    @bruderb

    Hej sebstrgg,

    I am looking for exactly the same function - scale just uploaded pictures!
    It seems your one step beyond.
    On my side, I am not even able to activate the trigger on creating a new file. How did you do?

  2. k1l1 commented on Oct 28, 2020

    @k1l1
    Contributor

    Some general tips, maybe it helps.

    1. Can you first verify that the workflow is actually triggered by your action, e. g., by filling out the script part with /usr/bin/php /var/www/nextcloud/occ notification:generate YOUR_USERNAME "some message: %n"
      This should send you a nextcloud notifcation if the action can at least trigger something.

    2. Use absolute paths for all executables

    3. Make sure user www-data can access all files scripts locations etc.

  3. radoeka commented on Aug 19, 2023

    @radoeka

    This issue can be closed I think. As it has been not been active for a very long time.

    Please close the issue, if that is ok for you.

  4. stellarpower commented on Jan 18, 2024

    @stellarpower
    1. /usr/bin/php /var/www/nextcloud/occ notification:generate YOUR_USERNAME "some message: %n"

    Would be great if this could be added to the readme! And other debugging steps in general I think, as it seems others are having difficulties in ensuring their flows are running correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions