andrewminton / enhanced_upload_field

Enhanced Upload field for Symphony CMS
Other
0 stars 2 forks source link

Idea for field #1

Closed andrewminton closed 11 years ago

andrewminton commented 12 years ago

Hi @nitriques,

I've created this repo as a proof of concept for overriding the destination folder on upload fields..

Use case is to be able to select a child/sub folder of the default destination folder given to you when you create an upload field in a section.

What I want is the ability to choose a sub folder of this destination folder when I edit an entry in order to keep my uploaded files as neat an tidy as the Database.

At present. when you upload files which you would want to categorize in the Database, you get one folder to upload them all, but I prefer to have the option to choose a child folder for a series of images instead of a huge folder with tones of images for a gallery.

We'l see how it goes, but I've made a start as an experiment.

I'm extending the Field and not the Upload Field, as I need to alter the DB tables for the experiment.... so going to work in isolation and see what works and doesn't.

If it becomes useful, it may be something to propose as an option/preference on the default upload field in the future.

andrewminton commented 11 years ago

Hi Nitriques.

I've created a branch on my repo for you when you're ready to send a pull request!

Joyeux Noel monsieur!

andrewminton commented 11 years ago

Hey @nitriques, would you mind sending a pull request to my nitriques branch when you get 5 mins?

I'd like to progress a little with this field as I am also thinking about adding a 'Change' file in field as well as uploading a different file' i.e select an already uploaded file from a drop down list.

This will mean adding a little JS to the field to reveal a selectbox with options similar to the folder list but it would include a list of files already uploaded to the current destination folder assigned in the field.

I've always found it awkward to have to re-upload a file if I know it exists in the workspace folder already... seems a bit stupid to be honest... so if you can send a pull request, I'd like to fork make a new branch based off your work and start the 'Change File' functionality as well :)

nitriques commented 11 years ago

Hey @andrewminton, sorry about that, I have been catching up on late projects these days and did not find the time to work on this one.

I've always found it awkward to have to re-upload a file if I know it exists in the workspace folder already... seems a bit stupid to be honest... so if you can send a pull request, I'd like to fork make a new branch based off your work and start the 'Change File' functionality as well :)

So am I. But I feel like to behaviour should be in the fieldUpload by default!

If you implement it nicely, I'll try to make this land in the core repro.

Let me play with my code a little but more and I will send you a pull request. I basically used @vlad-ghita's Multilinguall Uploal Field https://github.com/vlad-ghita/multilingual_upload_field as the starting point for the refactor.

Happy new Year !

nitriques commented 11 years ago

BTW, I think we can close this one ;)