nextcloud / nextcloud/workflow_script

can a script be used to rename files on upload?

Open
#51 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
89
Forks
19
Avg merge
6h 38m
Merged PRs (30d)
3

Description

Steps to reproduce

I've tried to find documentation on this question, but couldn't find anything. So I want to ask here: Is it possible to use a simple script to rewrite (some) file locations as they get uploaded?

I'm using a google pixel phone with auto-uploading enabled. The camera puts portrait pictures into a subfolder, which makes it quite hard to browse through these pictures in any tool other than the google pictures app. The nextcloud gallery also suffers a lot from this. See e.g.: https://support.google.com/pixelphone/thread/12756704?hl=en

So I'm left with workarounds for this android limitation. Currently, I'm running a manual script to rename these files every now and then and then rescan the whole data folder. I'm hoping that a workflow script could improve this situation somehow?

Expected behaviour

Documentation on whether one can move an input file, or whether this will require a rescan then afterwards?

Actual behaviour

I don't want to experiment with this without any documentation. So I don't know if it actually works or not?

Workflow Script app

1.3.1

Server configuration

Operating system: nextcloudpi

Web server: Apache

Database: MySQL

PHP version: 7.3.14

Nextcloud Version: 18.0.4

Where did you install Nextcloud from: nextcloudpi

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named in the issue. Start by reviewing the Workflow Script app documentation and its documented file-processing behavior, then establish whether an uploaded file can be moved and whether a rescan is required; done means recording the supported behavior and any limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.