orchidsoftware / orchidsoftware/platform

Custom Upload/Picture/Cropper upload path

Open
#1,885 1 comment 0 reactions 1 assignee View on GitHub

@tabuna is already working on this.

Since Sep 22, 2021.

Dominant language
PHP
Stars
4.8k
Forks
663
Avg merge
1d 9h
Merged PRs (30d)
7

Description

Is your feature request related to a problem? Please describe.
I'm using a Picture field in one of my layouts and I'm pretty happy with the functionality it provides, but there is one thing I don't like about it: it puts uploaded files under automatically created subdirectories. The project I'm working on has a strictly defined structure of folders for files being uploaded and such behaviour just makes things unnecessarily harder. It would be very convenient to have a control over such things.

Describe the solution you'd like
A path() method which allows to specify a particular path on the disk I'm uploading files to. A very similar proposal was in #1106 (here to be more precise), but it got never released since then.

Describe alternatives you've considered
It is, of course, possible to define a custom Generator class in the platform's config. But it looks more like a hack in this case, because it doesn't really add new functionality but tries to fix existing instead.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.