mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2026-04-25 23:15:51 +03:00
[GH-ISSUE #36] Valid response back, no image on server #28
Labels
No labels
Feature request
Feature request
bug
cant reproduce
enhancement
help wanted
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/pictshare#28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @scorobogaci on GitHub (Aug 14, 2017).
Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/36
Server response is ok
{"status":"OK","type":"png","hash":"1ucq23hnr5.png","url":"http:\/\/192.168.99.100\/1ucq23hnr5.png","domain":"http:\/\/192.168.99.100"}But image is not present in upload folder
@scorobogaci commented on GitHub (Aug 14, 2017):
Accesing after the url : http://192.168.99.100/1ucq23hnr5.png
redirects to the default upload page
@geek-at commented on GitHub (Aug 14, 2017):
looks like you have permission problems. check if the upload folders are created
@scorobogaci commented on GitHub (Aug 14, 2017):
@chrisiaut , upload folder is created inside container
/usr/share/nginx/html/upload exists
@geek-at commented on GitHub (Aug 14, 2017):
yeah but inside the upload folder is the 1ucq23hnr5.png folder created?
@scorobogaci commented on GitHub (Aug 14, 2017):
@chrisiaut nope, 1ucq23hnr5.png folder isn't created
also, sometimes image after upload appears for preview, sometimes not . but when clicking on the image, it redirects to default page
@geek-at commented on GitHub (Aug 14, 2017):
must be a permission problem then
@scorobogaci commented on GitHub (Aug 14, 2017):
logs from error.log on the container
2017/08/14 15:54:21 [error] 229#229: *59 FastCGI sent in stderr: "PHP message: P
HP Notice: Undefined index: HTTPS in /usr/share/nginx/html/index.php on line 17
" while reading response header from upstream, client: , server: _,
request: "POST / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168
.99.100", referrer: "http://192.168.99.100/"
2017/08/14 15:55:12 [error] 231#231: *63 FastCGI sent in stderr: "PHP message: P
HP Notice: Undefined index: HTTPS in /usr/share/nginx/html/index.php on line 17
" while reading response header from upstream, client: , server: _,
request: "POST /17aa3ngtwl.jpg HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000",
host: "192.168.99.100", referrer: "http://192.168.99.100/17aa3ngtwl.jpg"
@geek-at commented on GitHub (Aug 14, 2017):
that's just notices, nothing unusual. No seriously check the permissions of the upload folder
@scorobogaci commented on GitHub (Aug 14, 2017):
@scorobogaci commented on GitHub (Aug 14, 2017):
at permissions level seems to be ok
@geek-at commented on GitHub (Aug 14, 2017):
try the command
sudo su -c "touch /usr/share/nginx/html/upload/check" nginxand see if it gets created or if it says permission denied
@scorobogaci commented on GitHub (Aug 14, 2017):
I know it;s kind of strange, but after restarting pc , everything worked
I've metioned that i have an app on :9000 port , and somehow SGI remember the request from that app, which is using this service, and even that after I'm making request from the app page, it still apend on the log file the old request from :9000
@scorobogaci commented on GitHub (Aug 14, 2017):
sudo su -c "touch /usr/share/nginx/html/upload/check" nginxsudo is not available in container :(
@scorobogaci commented on GitHub (Aug 14, 2017):
@chrisiaut thank you for your help :)
Can you also add cors requests to the app, things like :
header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE'); header('Access-Control-Allow-Headers: Authorization');I don't know it this is a good practice , but maybe you have another idea or good practice to deal with it