Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working for nested storages #42

Open
mbrodala opened this issue Oct 13, 2021 · 4 comments · May be fixed by #43
Open

Not working for nested storages #42

mbrodala opened this issue Oct 13, 2021 · 4 comments · May be fixed by #43

Comments

@mbrodala
Copy link
Contributor

mbrodala commented Oct 13, 2021

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 added a commit to mbrodala/filefill that referenced this issue Oct 13, 2021
Fetch files from their storage using their local path instead of the full file identifier which may contain the base path of the storage.

Fixes IchHabRecht#42
@mbrodala mbrodala linked a pull request Oct 13, 2021 that will close this issue
@pulponair
Copy link

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

@mbrodala
Copy link
Contributor Author

mbrodala commented Jan 4, 2022

Can you debug, why?

@pulponair
Copy link

pulponair commented Jan 4, 2022

@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".

@mbrodala
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants