When attempting to index files which use the private:// stream wrapper the indexing fails because Drupal returns a 403 to the process requesting the file. The attached patch allows for the file to be read directly from the filesystem instead.

Comments

tekante’s picture

StatusFileSize
new2.18 KB
tekante’s picture

StatusFileSize
new2.19 KB

The patch in #1 inadvertently switched the extracted text from text mode to xml. This patch corrects that.

jax’s picture

ken hawkins’s picture

Status: Active » Needs review

Had same issue on a private file system and tekante's patch in #2 worked for us.

ken hawkins’s picture

Title: Use local filesystem path so that files which are private can be indexed » Allow attachment indexing in private file system

Cleaning up title.

teekay78’s picture

#2 works here, too. Thanks!

gaëlg’s picture

Status: Needs review » Reviewed & tested by the community
mike503’s picture

this is more or less duplicated from #1148162, the only difference is the file:// in the system command (which I don't think is necessary, as the get_realpath() should handle that

izus’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

closing as duplicate of #1148162: Use real path instead of url to retrieve file taht got merged.
please feel free to open back if you tested with the last code base and think you find that we are missing something here !
Thanks