Yeah I was hoping this was included into the different settings but I guess it's not. I hope I could come up with a solution but i don't have the slightest idea how to do it. If anyone there is in the mood to do this it would be really appreciated. thanks guys!!!!!
As far as I know, it is the particular content object rather than its original name or source that eZ publish is focused on. I guess it is only possible to update an image/file attribute within given object.
We've come across the same problem before, and the only solution we found was good planning of media repositories, including consistent media classification and naming.
I appreciate your advise but i just can't figure out why. I'm even using the SAME file, same size, and ez publish will save it using the same file name, I don't understand why ez publish will give different attributes if they are exactly the same....Hope someone else can enlight me on this...
ok no problem. Lets say that Im creating a new file. What we call her a postcard. In the description where you would put your text and stuff, theres a paper clip button I press it and it would ask me to upload the file, then i specify where i want it (the folder in the MEDIA part) then i put the attributes to it and it gets inserted. lets say i save that postcard, then open a new one, do the same thing and VOILA i have two exact same pictures with the exact same name in the folder.
I even opened the page in internet explorer and did some properties on the pictures and somehow ez publish adds a "_05" for example to the file name but inside ez publish I don't see that. so in my IMAGES folder i have for example
I was hoping for a little more technical description, but it really sounds like publishing instances of a class, that is objects, with a file/image attribute. In any such case, files do not exist by themselves, they belong to the published content.
But it's a good point, I haven't so far seen any eZ's ability to limit creation based on some data features and not system settings such as privileges, sections, parent nodes etc.
I hope I was able to catch the idea. In any way, sorry I wasn't able to help out.
All you have to do is to develop custom workflow with "before publish" trigger. Then in your own php code called by workflow, you can check any file attributes like file name and/or file size and compare it with existing files/objects. You can even compare hash of that image, but in this case you will need to keep hash of every uploaded image. So if hash (or other attribute) tells that image is already in content tree, you can terminate creation of new object/file.
If your site is busy, you will need to use some fast comparation method, like direct sql queries.