Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
I get this in console, when open securefile image url directly in a new tab.

Page opens, picture is already displayed, but the page keeps loading (up to 10-12 seconds) and then spills out the above in console. Used clean browser to check. What's that?
This error would suggest that the size of the file as reported in HTTP response header does not match the actual size of the file.

Does it happen on any particular file? Also are you testing on a local stack? Try rebooting the server and see if it helps.

Please PM me the access creds (FTP+Couch) to the problem site and I'll take a look at the issue, if you wish.

Seems to be a localhost issue.

I prepared a clean setup and it didn't work normally on localhost.

On the live server everything worked fine.

I will monitor this and hope to find what's causing this someday.

Thanks for getting back, appreciate that.
I found that trouble starts when cms:cloak_url is used on securefile images without undocumented parameter thumbnail='1'. Once I introduced it, problems are gone and page loads normally.
General update to this thread. Will show how to really solve this.

Using 'thumbnail'='1' is not a good solution, of course. Sometimes we need images, sometimes we need thumbs.

I spent over 6 hours today, examining all the relevant couch native code. I really had this trouble SO annoying and you'll agree with me if experiences the same. I have found another very old thread about this, but the problem is very randomly showing itself, so I must be lucky.

My troubles included: page loads for 10 sec, image disappears, couldn't download image, concole errors, erroneous file sizes while downloading etc.

So, it appears to root itself in the way localhost systems on *windows* report size of file. Of course, maybe some other thing influenced this, but proper size of file solves everything.

Finally, the solution which is working adequately, which I am happy to share.

/couch/download.php, line 253
Code: Select all
$size = ( $is_thumb ) ? @filesize( $path ) : $rs[0]['file_size'];

Remove the condition and replace it with direct size count of the physical file on disk:
Code: Select all
$size = @filesize( $path );

That helped me and what is basically happened here is that for normal images Couch takes filesize from database and it is not the same as the size on disk. Probably something (windows?, faulty db_update after image processing?) caused it, and for thumbnails filesize was taken from the disk file size instead. So, screw it and get disk size for both types. Immediate releif!

5 posts Page 1 of 1

Who is online

In total there are 4 users online :: 1 registered, 0 hidden and 3 guests
(based on users active over the past 5 minutes)

Users browsing this forum: Google [Bot] and 3 guests