Bug #33441
Files are indexed while being uploaded
| Status: | New | Start date: | 2012-01-25 | |
|---|---|---|---|---|
| Priority: | Must have | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| Votes: | 0 |
Description
If you store large files on the storage and you call the file list before the file transfer is completed, your file list will show an file with 0 byte.
History
Updated by Andreas Wolf over 1 year ago
- Project changed from FAL WebDAV Driver to File Abstraction Layer
Updated by Andreas Wolf over 1 year ago
I'm not sure how to prevent this, as we might not know about files currently being uploaded. We could try to keep track of files that are currently uploaded to a Storage and prevent indexing them. This would require registering these files in the addFile() method of the Storage/Driver, plus some additional logic in the Indexer to skip these files.
Updated by Andreas Wolf over 1 year ago
- Subject changed from Indexing 0 byte file to Files are indexed while being uploaded
We cannot stop this from happening when a file is uploaded externally, e.g. via SFTP oder HTTP to WebDAV, as TYPO3 does not know about this and there is in most cases no way to reliably detect this. It might however be possible via e.g. some storage-specific locks.
The more clever way to do this is to check the size and modification time from the storage when instantiating a file object or loading the index record. If either of them seems to be outdated, we should trigger an index update.