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

Warning when uploading Thumbnail Replacement #9

Open
iamdamosuzuki opened this issue Oct 22, 2017 · 2 comments
Open

Warning when uploading Thumbnail Replacement #9

iamdamosuzuki opened this issue Oct 22, 2017 · 2 comments

Comments

@iamdamosuzuki
Copy link

I get the following warning when trying to upload a Thumb Replacement for any Content Model:

Warning: file_get_contents({MY_SITE}/system/temporary/p1bt2prjfcugc1fnt174r1vln1ltvp.tmp): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in islandora_default_thumbs_admin_submit() (line 180 of /var/www/drupal/sites/all/modules/islandora_default_thumbs-7.x/includes/admin.form.inc).

This error does not appear when uploading an image to the Thumbnail Source in the Compare Image Configuration, which appears to working fine.

@jordandukart
Copy link
Contributor

Was unable to reproduce this locally. If I had to take an educated guess the issue appears to be the configuration of where your temporary directory is. Plupload appends ".tmp" onto those files (http://cgit.drupalcode.org/plupload/tree/plupload.module?h=7.x-1.x#n359) when storing the uploads. It's worth noting, like you mentioned, that it's not plupload tossing that file_get_contents warning but I'd have a look at your temporary directory regardless.

For example when looking at this on my local, with a different default thumbnail, the path that is attempting to be compared to is:
public://islandora_default_thumbs/replace_icons/test.jpg.

@brnco
Copy link

brnco commented Dec 7, 2017

@iamdamosuzuki and I are working together on this.

First, I tried changing the temporary file directory, temporary:// was set to /tmp but islandora_default_thumbs was looking in public://system/temporary. I changed the temporary directory (via admin/config/media/file-system) to /var/www/drupal/sites/default/files/system/temporary.

temporary files are being saved to this location when uploaded via plupload.
/var/www/drupal/sites/default/files/system/temporary# ls
p1c0nev5vh1l9j7dsif2ljjdjp.tmp

Next I verified permissions for www-data:
/var/www/drupal/sites/default/files/system/temporary# ls -ld .
drwxr-xr-x 2 www-data www-data 4096 Dec 6 19:05 .

but we're still getting the same error

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

No branches or pull requests

3 participants