File Previewer on Direct Server

maniek015

Member
YetiShare User
Jan 14, 2016
42
2
8
Hi all,
I have YetiShare installed on main site and for files I have configured Direct Server.

I notice a problem in the 5.1.0 version.

When I upload the image or video thumbnail and original file in file previewer is broken, but files can normally be downloaded from the direct server, there is a problem with images or video - images do not generate a thumbnail, when I enter the file preview in the manager, there is also a combined image there - the link leads to, for example :
Code:
[direct_server_domain_here]/cache/plugins/filepreviewer /9128/a82d8d41613eb6173bf9c349e1371e908c81d16ef5b146d72e5b22bbcad79bbc/1100x800_cropped.jpg
and when I enter this link I get 404.

When I try run this by cron I have this log :
Code:
===========================================================
2021-02-01 14:15:16 - Starting cron task.
2021-02-01 14:15:16 - Ended cron task after all pending images processed.
===========================================================
2021-02-01 14:16:03 - Starting cron task.
2021-02-01 14:16:03 - Set item processing: #9131 (132494112_5117368951637357_4806778907679103304_n.jpg)
2021-02-01 14:16:03 - Created thumbnail url: https://[direct_server_domain_here]/cache/plugins/filepreviewer/9131/ff4d0ae6c6a27071e428fe405ec72d73c0e61a6ca26316f59d244e3b4d1c62af/280x280_middle.jpg
2021-02-01 14:16:04 - Failed getting url contents in time.
2021-02-01 14:16:04 - Ended cron task after all pending images processed.
The video player also fails to start, a crossed play icon appears.

The cache folder on the direct server and the main site server exists, and has chmod 755.

When I upload image or video to the local storage all works properly.

The rules in .htaccess are added to the direct server, but script rule don't rewrite to the main site when I visit the Direct Server HTTPS adress - here is the rule :
Code:
RewriteEngine On
RewriteBase /
RewriteRule ^(.+)\~s$ https://mainsiteadress.com/$1~s [L]
RewriteRule ^(.+)\~i$ https://mainsiteadress.com/$1~i [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?_page_url=$1 [QSA]
- in the main domain domain install also. CRONs also replaced.

I have no idea where the problem could be.
 

Attachments

  • Like
Reactions: cr33p

maniek015

Member
YetiShare User
Jan 14, 2016
42
2
8
Small update in this case :
1. I do purge cache on main site and direct server and generate thumbanil and preview now work ok.
2. Video playing also work, but didn't work on Safari in MacOS - on Google Chrome, Mozilla firefox is okay, but I have "player in player", like in attachment.

This rule :
Code:
RewriteEngine On
RewriteBase /
RewriteRule ^(.+)\~s$ https://mainsiteadress.com/$1~s [L]
RewriteRule ^(.+)\~i$ https://mainsiteadress.com/$1~i [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?_page_url=$1 [QSA]
not rewrite direct file server to the main site - If I use the correct rewrite in magane server I have error. Anyone have a solution for this?
 

Attachments

  • Like
Reactions: cr33p

cr33p

Member
YetiShare User
May 8, 2016
33
2
8
i have same issue
purged cache on both servers, no luck
also i'm using nginx only
no apache
 

maniek015

Member
YetiShare User
Jan 14, 2016
42
2
8
I resolve this problem as @cr33p say - set chmod 777 to /plugins/filepreviewer and also clear all cache on the main server and the file server :)

So it's fixed by this simple way :)