[TYPO3-dam] Usage field of DAM record shows files under /uploads directory

Tobias Schmidt t.schmidt at minuskel.de
Tue Jun 19 13:25:58 CEST 2012


Hi Lorenz, thank you for your answer.

I partially disagree. In the use case that you describe (one file under 
fileadmin, multiple usages in content elements) it might make sense.

But my usecase is the following: I upload a file to some directory under 
fileadmin. The usage field of this file shows some usages immediately.
This happens if a copy of this file already exists under uploads/pics. 
The files are considered to be the same because the file hash of both 
files is the same and the file path is not taken into account.
There are at least two ways that let you store a file under uploads/pics 
without a reference to a specific file under fileadmin:
1) Upload a file inside a content element so there is no DAM record (no 
reference at all)
2) Use the same file inside a content alement from a different directory 
under fileadmin (a reference to another DAM record)

In my case I would consider it a bug.

I think it needs to be discussed what should be tracked. The usage of 
the file itself no matter where it is stored or the specific file in a 
specific directory. I would prefer the latter.

Best regards
Tobias

Am 16.06.2012 18:52, schrieb Lorenz Ulrich:
> Hi Tobias
>
> I don't know if it is intended behaviour, but I could imagine the
> following:
>
> When you select e.g. a picture for usage in tt_content (but without
> using dam_ttcontent), the file is not referenced directly, but copied to
> uploads/pics. That could be the reason DAM is also monitoring these
> files to keep track of all usage... referenced or copied.
>
> Makes sense, doesn't it?
>
> Best regards,
>
> Lorenz
>
> Am 12.06.2012 11:16, schrieb Tobias Schmidt:
>> Hi, I'm using DAM 1.2.4 und TYPO3 4.5.16.
>>
>> I was wondering why the usage field of DAM records shows files that are
>> located under the /uploads directory. I came across this strange
>> behaviour when I uploaded a file and it immediatly displayed a few pages
>> where this file is being used.
>>
>> Diving into the DAM source code I finally came to the method
>> getMediaUsageReferences() inside lib/class.tx_dam_db.php. At the end of
>> this method there is the following line:
>> $rows = array_merge($rows, tx_dam_db::getMediaUsageUploads($uidList, '',
>> ''));
>>
>> With the third parameter being an empty string the call to
>> getMediaUsageUploads() is not restricted to any directory. The usage of
>> files is only determined by file hash which can of course be the same
>> for files that belong to a DAM record and files that are located under
>> /uploads.
>>
>> Is this the intended behaviour? If yes what is the idea behind it?
>> If no is there already a bug report for this?
>>
>> Or could it be there is something wrong with my setup?
>>
>> Best regards
>> Tobias
>



More information about the TYPO3-project-dam mailing list