Open torejx opened 9 years ago
I think that possible already. If you upload a file, it will be place under "uploads/file/bg01.jpg", you can use this for your url. Maybe the file module should get a setting for the dir. Than you could create a copy of the file module and named "system". The "normal" files would be placed under "uploads/file/foo.jpg" and the "system" files like your background image under "uploads/system/bar.jpg".
But what happens when the user decide to change the background image? I should tell him to rename the new image as the old one to keep my css rule valid.
Ok. What is when the slug name will be used as filename? The slug is unique and I'm not sure what happen, when you create two file-item with the same filename (but different content). With the slug name solution each file-item have there own unique file.
Good idea! Do you suggest a flag "use slug as filename" instead of the text box?
I dont think it a good idee to give the user this extra option. I favor to use always the slug as filename and just give the user a hint, that the slug used as filename and the file extension will just append to the slug.
But in this way you override the default behavior. I don't know if it's a valid option.
Yes, but is the current behavior valid? Multiple file-item can use the same filename and maybe override each other. The slug-filename-solution could be a better "default" behavior.
I agree. What can we do? Have you already performed a pull-request? Should I change mine?
No, I have no a pull-request for this. Best you change this or create a new one.
Hi Noumo,
This is my problem: I've some css classes that use images as background, for example:
I want to let the user change the background using the cms interface, so I think it's a good idea to create a File for each background with a fixed filename, so the user can change the File (the image) and I don't need to change the css.
It's my first pull request, I hope it could be usefull.
Thanks!