#1 2018-07-17 09:01:17


images.addSimple appears to work but thumbnails broken


I am writing a OneDrive sync client, and placing the sync'ed files in the upload folder. I would then like to add them to Piwigo through the api.

I am interacting with the api through the Python piwigo package. When I call the addSimple api, everything seems to work as expected:

import piwigo
from piwigo import Piwigo
mysite = Piwigo("")
mysite.pwg.session.login(username='...', password='...')

{u'url': u'', u'image_id': 15644}

I can see the orphaned photo listed in Piwigo, but the thumbnail is broken. If I 'zoom', I get a 'failed to load image'. However, if I download the original photo, that works fine.

Perhaps of interest is this:

>>> mysite.pwg.images.getInfo(image_id=15644)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/piwigo/", line 96, in checking
    return fn(self, **kw)
  File "/usr/local/lib/python2.7/dist-packages/piwigo/", line 132, in __call__
    raise e 401 : Access denied

The session is created with my webmaster account, and Python is running under sudo. The file on disk has the following permissions:

$ ls -lh /datadisk/upload/2017/07/02/20170701_190431634_iOS.jpg
-rwxrwxrwx 1 www-data www-data 1.8M Jul 15 09:46 /datadisk/upload/2017/07/02/20170701_190431634_iOS.jpg

I would appreciate any tips on how to troubleshoot, or suggestions as to what I might be missing.

Piwigo 2.9.4
Operating system: Linux
PHP: (Show info) [2018-07-16 23:57:05]
MySQL: 5.5.5-10.1.29-MariaDB-6 [2018-07-17 06:57:05]




Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate © 2002-2019 · Contact