HaschekSolutions / pictshare

:camera: PictShare is an open source image, mp4, pastebin hosting service with a simple resizing and upload API that you can host yourself. :rice_scene:
https://www.pictshare.net
Apache License 2.0
819 stars 123 forks source link

v2 Data directory not writable #77

Closed feruzm closed 5 years ago

feruzm commented 5 years ago

I am trying out v2 of pictshare and I noticed that upload page is not hidden if I enable

define('UPLOAD_FORM_LOCATION', 'secret/upload');

also I get this error, any idea what folder needs some modification or what kind of permission change is necessary?

image

geek-at commented 5 years ago

Well is your data directory writable for your webservers user? for testing you could chmod -R 777 data/ from within the root directory of pictshare

UPLOAD_FORM_LOCATION is not yet implemented

feruzm commented 5 years ago

that fixed it thanks! got another image

geek-at commented 5 years ago

very interesting. Can you upload the same file on our dev server https://dev.pictshare.net/ to see if it's a problem with your local installation?

feruzm commented 5 years ago

yes, looks like it is local installation issue uploaded to your dev server but to local one not working

image

geek-at commented 5 years ago

Ok I see you need to change your max upload settings since the file is too big for PHPs and Nginx default values

  1. Edit your php.ini (probably somewhere in /etc/php/7.fpm/php.ini and change upload_max_filesize and post_max_size to a larger value
  2. add client_max_body_size 20M; to your nginx config file for your pictshare instance. I also added this now in the install guide

Thanks for testing!

feruzm commented 5 years ago

great, thanks! 🙏