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

Allow Resource Collection of file uploads to be defined #114

Closed
bwaidelich opened this issue Jun 16, 2020 · 0 comments
Closed

Allow Resource Collection of file uploads to be defined #114

bwaidelich opened this issue Jun 16, 2020 · 0 comments
Assignees

Comments

@bwaidelich
Copy link
Member

Currently files uploaded with the FileUpload Form Element always end up in the persistent resource collection.
For several reasons it would be nice to be able to specify a custom resource collection for the uploaded resources

@bwaidelich bwaidelich self-assigned this Jun 16, 2020
bwaidelich added a commit that referenced this issue Jun 16, 2020
This feature extends the `FileUpload` Form element such that
the target Resource Collection can be configured.

This can be useful for example in order to prevent uploaded
files to end up in the public "persistent" collection:

    Neos:
      Flow:
        resource:
          targets:
            'formUploadTarget':
              target: 'Some\Package\SomeProtectedResourceTarget'
          collections:
            'formUploads':
              storage: 'defaultPersistentResourcesStorage'
              target: 'formUploadTarget'
      Form:
        presets:
          'default':
            formElementTypes:
              'Neos.Form:FileUpload':
                properties:
                  # use our custom resource collection for all "FileUpload" form elements
                  resourceCollection: 'formUploads'
                  # Prevent preview link to be created in order to avoid publishing of the Presistent Resource
                  createLinkToFilePreview: false

Thanks to internezzo ag for sponsoring this feature!

Resolves: #114
bwaidelich added a commit to neos/form-builder that referenced this issue Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant