With web browser thumbs, viewing images and downloading is not working

Hi everybody!

I have mainly used my seafile with android app and it’s working fine. Automatic camera uploads works, I can see thumbs and download pics. But when I use web browser, I can’t see thumbs, can’t view bigger pics (the image could not be loaded) or can’t download them from my automatic camera upload folder. (No pics anywhere else) I can copy pics to another folder and then pics are working like they should with browser.
Only messages in log about this are like:
django.request:170 get_response Not Found: /repo/3a4e33df-(and so on)/raw/My%20Photos/Camera/nameofthepic.jpg
Nothing helpfull in other logs. //edit I found some information in Apache2 access.log. Check third post.

Any idea why this happened? What is the easiest way to fix this?

I have done some testing.

  1. Copied pics to Camera folder from the Uploads/My Photos/Camera folder.
    They started working fine in the firefox browser. (thumbs and bigger pics)
  2. Enabled autoupload from my android phone to Camera folder. (Creates automatically Camera/My Photos/Camera path and starts uploading.)
  3. Disabled auto upload.
  4. Moved pics from Camera folder to Camera/My Photos/Camera/.
  5. Pic thumbs disappeared and no big pics.

Why the pics in the autoupload folder is not working in a browser? I am confused.

Today I tried again and turned camera upload on again. Now I chose folder with only 3 images. After automated upload same problem with web (Firefox). No thumbs, can’t view images or download (File does not exist says Seafile) them.

Found these from Apache2 access.log:
my.ip.add.res - - [08/May/2017:13:06:17 -0400] “GET /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-26-14111897.png HTTP/1.1” 404 4626 “https://mydoma.in/” “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0”
my.ip.add.res - - [08/May/2017:13:06:17 -0400] “GET /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-26-13595731.png HTTP/1.1” 404 4768 “https://mydoma.in/” “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0”
my.ip.add.res - - [08/May/2017:13:06:18 -0400] “GET /ajax/unseen-notices-count/?_=1494263212097 HTTP/1.1” 200 480 “https://mydoma.in/” “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0”
my.ip.add.res - - [08/May/2017:13:06:18 -0400] “GET /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-24-17001406.png HTTP/1.1” 404 4768 “https://mydoma.in/” “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0”
my.ip.add.res - - [08/May/2017:13:06:22 -0400] “GET /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-26-14111897.png HTTP/1.1” 404 4626 “https://mydoma.in/” “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0”
my.ip.add.res - - [08/May/2017:13:06:22 -0400] “GET /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-24-17001406.png HTTP/1.1” 404 4626 “https://mydoma.in/” “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0”
my.ip.add.res - - [08/May/2017:13:06:22 -0400] “GET /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-26-13595731.png HTTP/1.1” 404 4626 “https://mydoma.in/” “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0”
my.ip.add.res - - [08/May/2017:13:06:27 -0400] “GET /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-26-13595731.png HTTP/1.1” 404 4768 “https://mydoma.in/” “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0”
my.ip.add.res - - [08/May/2017:13:06:27 -0400] “GET /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-24-17001406.png HTTP/1.1” 404 4768 “https://mydoma.in/” “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0”
my.ip.add.res - - [08/May/2017:13:06:28 -0400] “GET /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-26-14111897.png HTTP/1.1” 404 4768 “https://mydoma.in/” “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0”

This is from seahub_django_request.log:
2017-05-08 17:06:17,987 [WARNING] django.request:170 get_response Not Found: /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-26-14111897.png
2017-05-08 17:06:18,001 [WARNING] django.request:170 get_response Not Found: /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-26-13595731.png
2017-05-08 17:06:18,369 [WARNING] django.request:170 get_response Not Found: /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-24-17001406.png
2017-05-08 17:06:22,162 [WARNING] django.request:170 get_response Not Found: /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-26-14111897.png
2017-05-08 17:06:22,164 [WARNING] django.request:170 get_response Not Found: /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-26-13595731.png
2017-05-08 17:06:22,193 [WARNING] django.request:170 get_response Not Found: /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-24-17001406.png
2017-05-08 17:06:28,003 [WARNING] django.request:170 get_response Not Found: /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-26-13595731.png
2017-05-08 17:06:28,004 [WARNING] django.request:170 get_response Not Found: /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-24-17001406.png
2017-05-08 17:06:28,159 [WARNING] django.request:170 get_response Not Found: /repo/49dce331-98f5-4329-895d-a7241ac11ca2/raw/My%20Photos/3images/IMG_2016-07-26-14111897.png

Time zones are different…

Auto uploaded images are located in:
My Libraries / test / My Photos / 3images (not working)
I copyed images from My Libraries / test / My Photos / 3images to:
My Libraries / test
and everything works fine again in that folder with Firefox.

I can’t find auto uploaded files from my Ubuntu 14.04 server using command line. Where are they? I want to check folder permissions.
Please help me. What else should I do to find the solution? This is getting really frustrating

Thanks for the report, we will try to reproduce the problem and look into it.

This is a misconfiguration. Requests are send to the wrong component.

Can you help me to find the misconfiguration, please? I can’t find it.

Anybody? I really need help. :frowning:
Is my mysql, apache or seafile misconfigurated… Ubuntu 14.04… Iptables should be ok.
I read through config files but everything looks fine. I don’t know which config line could do this.
I did some security hardening. Here’s thread about it.

Basicly I don’t understand what android app does, when it creates auto upload path. What is the differense to creating folder manually with web gui.

Some progress, finally.
Things just don’t work because there’s a space in the folder name. My Photos
Renaming it to Photos, thumbs and everything started working in the automatic upload folder with web browser.
Cons: automatic upload creates new path with My Photos and uploads there…

How should I continue to fix that?

Use nginx.

1 Like

This is my first time ever I have setup nginx. Do you think this config is safe and will work?

server {
listen 80;
server_name mydomain.com;
rewrite ^ https://$http_host$request_uri? permanent; # force redirect http to https
}
server {
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/mydomain.com/fullchain.pem; # path to your cacert.pem
ssl_certificate_key /etc/letsencrypt/live/mydomain.com/privkey.pem; # path to your privkey.pem
server_name mydomain.com;
ssl_protocols TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
ssl_ciphers ‘ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:!DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA’;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_stapling on;
ssl_stapling_verify on;

    proxy_set_header X-Forwarded-For $remote_addr;
    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
    server_tokens off;
    location / {
        fastcgi_pass 127.0.0.1:8000;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_script_name;
        fastcgi_param SERVER_PROTOCOL $server_protocol;
        fastcgi_param QUERY_STRING $query_string;
        fastcgi_param REQUEST_METHOD $request_method;
        fastcgi_param CONTENT_TYPE $content_type;
        fastcgi_param CONTENT_LENGTH $content_length;
        fastcgi_param SERVER_ADDR $server_addr;
        fastcgi_param SERVER_PORT $server_port;
        fastcgi_param SERVER_NAME $server_name;
        fastcgi_param REMOTE_ADDR $remote_addr;
        fastcgi_param HTTPS on;
        fastcgi_param   HTTP_SCHEME         https;

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
fastcgi_read_timeout 36000;
client_max_body_size 0;
}
location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://127.0.0.1:8082;
client_max_body_size 0;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
proxy_send_timeout 36000s;
send_timeout 36000s;
}
location /media {
root /home/seafile/seaf/seafile-server-latest/seahub;
}
location ~/.ht {
deny all; }
location ~ /.well-known {
allow all; }
}

I found some guides how to setup letsencrypt sertificate and the last lines are for auto renew. But I don’t know if that work with seafile… Do you have any idea?

Maybe you should have a look at this discussion about apache bug.

I read about it and I think the easiest way to me is to use nginx. I haven’t use nginx before, but basic configs are easy to do with seafile manual and with some googleing. I’m not going to do any special configs so I think I’m ok with this.