filefill icon indicating copy to clipboard operation
filefill copied to clipboard

Not working for nested storages

Open mbrodala opened this issue 4 years ago • 4 comments

Technically TYPO3 allows for creating storages which exist within other storages. Example:

  • Storage UID 1: fileadmin/
  • Storage UID 2: fileadmin/media/

If a file from storage UID 2 like fileadmin/media/videos/video.mp4 is now embedded in content, Filefill fails to download this file.

mbrodala avatar Oct 13 '21 15:10 mbrodala

@mbrodala Just tried your PR in TYPO3 11.5.4. Unfortunatly it is not working. RemoteResourceCollection::getFileObjectFromStorage returns null (file not exists) :(

pulponair avatar Jan 04 '22 15:01 pulponair

Can you debug, why?

mbrodala avatar Jan 04 '22 15:01 mbrodala

@mbrodala Yes here is what i found out : Storage UID 1: fileadmin/ Storage UID 2: fileadmin/media/

Physical file: fileadmin/media/a.jpg

For some reasons a.jpg in sys_file is in storage 1. But TYPO3 or Filefile is using "findBestMatchingStorageByLocalPath" which returns Storage uid 2. -> fail

So i was wrong your patch works for files that have sysfile storage uid 2 but not if they have storage uid 1. I guess one need to change how filefile determins the "matchingStorage".

pulponair avatar Jan 04 '22 16:01 pulponair

Not sure anything can be done about this. The extension uses the offical TYPO3 API to determine the storage for a given file path

mbrodala avatar Jan 12 '22 16:01 mbrodala