0
Planned

Thumbnail generated but directory listing doesn't update for uploaded STLs

me 3 months ago updated by Vlad R 3 months ago 8

Screen shot 1

Screen Shot 2

Once again, thank you very much for all your help with this.  This is a really amazing piece of software and I continue to be impressed with the features.


I think I did run across an odd bug.  When you upload a file via file-sync everything seems to work well.  But when you upload a file via the webpage interface it doesn't seem to ever realize it has a thumbnail.  As you can see here the three files "Aline" were STLs uploaded via the interface.  The second screen shot shows that the thumbnail was generated by the system in the proper place.  However no matter what I do when I refresh, log in, log out, switch computers, or run the thumbnail cron it doesn't seem to trigger these to show the thumbnail.

When you look at the file in the list it appears to have the green 3d.png box icon hard coded as the thumbnail rather than the cached thumbnail.

Is there anything you'd like me to test or try?

Under review

What are the sizes of the files that don't get thumbs?

3.3mb, 24.6mb, 24.4mb and 36.3mb

I've noticed that 500mb files can't be thumbnailed likely because I run out of ram or swap.

But everything else can thumbnail up to approximately 325mb.  The only thing I can determine is that they were uploaded via the web interface and not synced via Nextcloud.

one more piece of data, when I refreshed, logged out, logged in, soft refreshed, hard refreshed inside safari they don't change.

when I log in via chrome or safari privacy mode, the thumbnails worked and refreshed with the new correct orientation.

Is there a super aggressive cache header that's being sent for safari for that 3dcube image?

I suspect that when I switched computers it still had not been cached by the thumbnailer.  when I ran the cron script it got a thumbnail.  now when I log in with "fresh" browsers it correctly gets the thumb.  safari does interesting things with sharing browser history across computers nowadays too that may be making this more unusual.

let me know if you need a login to my instance to make sure I'm not insane.

after a little more research:

it appears that a contributing factor may be permissions and filemask.

when running make_thumbs script it sets permissions of directories to the current user, however then the web user www-data cannot edit those directories.

I'm cleaning up permissions which is fixes a few cases of thumbnails not being generated.  but there's still something odd around certain entries in the directory view not ever recognizing they have a thumbnail.  It's like if they fail a certain number of times they stop trying to check for thumbnails.

+1

You could do: 

sudo -u www-data php make_thumbs.php

aha.  one more thing:

if you have a directory "filename01" and a file "filename01.stl" in the same folder a thumbnail will not be generated.

maybe two fixes:

1) make_thumbs script sets permissions of generated files to the system expected ownership and filemask

2) handle the case of a file and folder having the same base name.

to test:

via filesync create folder "item1", inside it put "item1.stl" and "item1.jpg"

move "item1.stl" to parent folder so that "item1" folder and "item1.stl" are peers

rename "item1.stl" to "item 1.stl"

wait

thumbnail will be generated 

+1
Planned

Will definitely look into this bug. Thanks for pointing it out!