Edgewall Software
Modify

Opened 14 years ago

Last modified 15 months ago

#9771 new defect

Undocumented/unintended? Max preview size limited by wiki max page size

Reported by: charlesc-web-feedback-trac@… Owned by:
Priority: normal Milestone: next-stable-1.6.x
Component: attachment Version: 0.12-stable
Severity: normal Keywords: max preview size verify
Cc: jorrit@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I'd bumped the attachment size limit on our local Trac instance up from the default 256K to 1M, but another developer noted that when he uploaded a PNG image that was >256K, the attachment link still stated "HTML preview not available, since the file size exceeds 262144 bytes".

Raising the apparently-unrelated [wiki] max_size configuration item to 1M solves the problem. So it looks to me like the max previewable size is actually the lower of (mimeviewer.max_preview_size, wiki.max_size). Whether that's what was intended is another issue…

Attachments (0)

Change History (14)

comment:1 by Remy Blank, 14 years ago

Keywords: verify added
Milestone: next-minor-0.12.x

We need to check that.

comment:2 by anonymous, 13 years ago

I changed my max attachment and wiki page sizes to 1M and I still get the "HTML preview not available, since the file size exceeds 262144 bytes" message.

My Trac version is 0.12.2

comment:3 by Christian Boos, 13 years ago

Force reload in the browser?

comment:4 by markus.pelkonen@…, 13 years ago

Having same problem.. png size is ~ 340k… Image macro renders thumbnail (forced to be small) nicely, but once I click the thumbnail, I get this error. Changed

[mimeviewer]
max_preview_size = 1048576

⇒ No help.

Changed also

[wiki]
max_size = 1048576

No help.

Restarted my apache and forced reload with browser.. no help.. Please let me know if there is any other place where form I could workaround this.

comment:5 by markus.pelkonen@…, 13 years ago

Ah, and by the way I inherit ~ 90% of configurations from shared project.ini if that would explain…

comment:6 by anonymous, 13 years ago

hmm.. this was very weird cache problem… after third forced reload, i got the page properly rendered..

in reply to:  6 comment:7 by olive@…, 13 years ago

Replying to anonymous:

hmm.. this was very weird cache problem… after third forced reload, i got the page properly rendered..

Idem here: wiki::max_size is not required, but I needed to force-reload 3 or 4 times the page to get the preview correctly the PNG.

comment:8 by jorrit@…, 11 years ago

Cc: jorrit@… added

comment:9 by Ryan J Ollos, 10 years ago

Milestone: next-minor-0.12.xnext-stable-1.0.x

comment:10 by Ryan J Ollos, 8 years ago

Milestone: next-stable-1.0.xnext-stable-1.2.x

Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.

comment:11 by Ryan J Ollos, 5 years ago

Milestone: next-stable-1.2.xnext-stable-1.4.x

comment:12 by anonymous, 3 years ago

Powered by Trac 1.5.3

I increased the attachment max_size to 5242880 (5M) then I was able to upload my images. Then when I clicked the attachment link, I got

HTML preview not available, since the file size exceeds 256.0 KB

However referencing the pictures in comments like thumbnails

[[Image(picture.jpg, 120)]]

works fine.

in reply to:  12 comment:13 by Jun Omae, 3 years ago

I increased the attachment max_size to 5242880 (5M) then I was able to upload my images. Then when I clicked the attachment link, I got

Please ask on the mailing list for support questions. Do not ask here.

HTML preview not available, since the file size exceeds 256.0 KB

Try to configure [mimeviewer] max_preview_size, not [attachment] max_size.

comment:14 by Ryan J Ollos, 15 months ago

Milestone: next-stable-1.4.xnext-stable-1.6.x

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.