"Upload to..." impossible in containers of type other than 'Folder'
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 57
- Forks
- 103
- Avg merge
- 10h 25m
- Merged PRs (30d)
- 18
Description
Bring here this: https://community.plone.org/t/tinymce-upload-file-to-containers-other-than-folder-large-plone-folder-plone-site-impossible/16135/2
The problem is that selectableTypes are defaulted to ['Folder'] here
IMHO, it would be nice either of this two options:
- let the used related items pattern look for some generalist interface like
IPrincipiaFolderishas suggested by @petschki (https://community.plone.org/t/tinymce-upload-file-to-containers-other-than-folder-large-plone-folder-plone-site-impossible/16135/3?u=sauzher) - get
selectableTypesbe parametrized so that a consumer (for ex. TinyMCE template) could pass its specific configuration viadata-pat-upload. Actually TinyMCE hasProducts.CMFPlone.interfaces.controlpanel.ITinyMCESchema.plone.contains_objectsconfiguration registry option that seems to fit quite well.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/pat/upload/upload.js around line 49, then inspect the related items pattern and the TinyMCE template's data-pat-upload configuration. Compare the IPrincipiaFolderish suggestion with parameterizing selectableTypes from ITinyMCESchema.plone.contains_objects; done means uploads are available in supported non-Folder containers without breaking existing Folder behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100