Comments

You must log in or register to comment.

3

WindTalk wrote (edited )

I didn't have to turn anything on after I installed it. Maybe check file permissions? Look if files are showing up in public/media/cache/submission_thumbnail/ folder

2

jankarl wrote

Hmm, there is no folder named 'media'. Only 'submission_images' which is empty.

2

WindTalk wrote (edited )

Looking at the install we are conversing on, this is exactly how it works for me... for example, /f/Postmill has this one:

https://raddle.me/media/cache/resolve/submission_thumbnail/7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png

On my Ubuntu Server 16.04 install, I didn't have to enable anything for similar thumbnails to start appearing.

The link has to conform to some kind of convention to get one. This link should produce a thumbnail, it does on Raddle.me https://www.huffingtonpost.com/entry/junot-diazafrican-diaspora-systematic-rape_us_5a7dbbefe4b08dfc9303693f

2

WindTalk wrote

are you running in "bin/console server:run" mode for testing, or have you wired it up to Apache or some other webserver?

2

jankarl wrote

I'm running on Nginx Web Server. But I just tried this on PHP server (bin/console server:run) and thumbnails are working just fine. What could cause this?

2

WindTalk wrote (edited )

What could cause this?

Theoretical answer: The security / file permissions model is much simpler when running the PHP server. That's what would cause it... file permissions. With the PHP server, the user login you created the directories with is also the user account who is running the server.

In computer security, reading files is much more lax than writing files. And when a user submits a new link, the JPG they provide (from the URL they send) is being written to your server. So write permission is much more serious topic - as one person is able to publish a JPG that potentially billions of other people would then download.

Does that high-level answer make sense?

Or, it could be an environment variable is set in a different way via Nginx, and it not being set disables the Postmill feature.

I don't know, but if you find out - please share what you had to do to fix it. And if you can't fix it, let me know and I can install Nginx and Postmill and try to study the situation first hand. Tell me what operating system you are running on.

2

jankarl wrote

Yes, the problem was with the permissions.

I've added user "universe" to group "www-data": ("universe" is my server's user account)

sudo usermod -a -G www-data universe

Set permissions for user group www-data:

sudo chgrp -R www-data Postmill

And then:

sudo chmod -R g+w Postmill

Thanks WindTalk for the clue!