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

New Feature: Manage existing images #13

Open
Tokay-tech opened this issue Jun 1, 2018 · 1 comment
Open

New Feature: Manage existing images #13

Tokay-tech opened this issue Jun 1, 2018 · 1 comment

Comments

@Tokay-tech
Copy link

Hello,
It would be great to be able to manage existing images, it seems that now "ContenTools" supports this new feature.
'https://github.com/GetmeUK/ContentTools/pull/493'

@nliautaud
Copy link
Owner

Totally agree.
I'm waiting for the feature to be reviewed and possibly merged on ContentTools side.

The basics should be easy to implement, but I'll have to decide how to keep track of the files in a pico-simple way. Here are some solutions I see :

  1. list all files stored in uploadpath directory.
    Cons : not contextual, can be messy with a lot of files, maybe some performance issues.
  2. keep an history of uploaded files directly in the PicoContentEditor page metadata settings.
    Cons : files references could be altered by editing the list (forget files, break or add non-existant paths)
  3. manage an external yml database with files/pages relations.
    Cons : break if page moved, cannot be rebuilt if lost, reinstall, etc.
  4. reproduce content structure when uploading files, like in Pico Pages Images, to contextualize.
    Cons : break if page moved.

I would go with solution two, by reducing some issues with :

  • Edit the page metadata on upload to add the new filename to an history list.
  • Edit the page metadata at the right time(s) to check the files in history and remove the missing ones.
  • Return the history list to the editor UI when requested.
  • Adding the solution one as an option in one way or another. Ideally a switch in the ContentTools UI between "uploaded on that page"/"all files", but not sure that I'll be able to dive into CT UI building.

An advanced UI have been implemented here https://github.com/cubiclesoft/ContentTools/tree/barebones (see http://barebonescms.com/demo), don't know if it can be used.

Feel free to tell me your thoughts.

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

2 participants