moinwiki / moin-1.9

MoinMoin Wiki (1.9, also: 1.5a ... 1.8), stable, for production wikis
https://moinmo.in/
Other
140 stars 51 forks source link

Can't embed picture on page #89

Closed gerrat closed 2 years ago

gerrat commented 2 years ago

I'm trying to embed a picture on a page, and though matter how I format the picture, it gives me this error:
Current configuration does not allow embedding of the file BlastCountDisplay because of its mimetype application/octet-stream I've used imagemagic to inspect the image, and it's mimetype is image/png (output below).
I've tried saving this as a jpeg, tried embedding it in a pdf, but though matter what format I choose, I get this same error. The odd thing is that I have other pages with embedded png, jpeg, and pdf files that are working fine.

Currently using MoinMoin 1.9.8, but reading through the release notes, I didn't see anything that looked like this would change since.

C:\temp>magick identify -verbose "Blast Count Display.png"
Image:
  Filename: Blast Count Display.png
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 813x657+0+0
  Resolution: 47.24x47.24
  Print size: 17.21x13.9077
  Units: PixelsPerCentimeter
  Colorspace: sRGB
  Type: TrueColorAlpha
  Base type: Undefined
  Endianness: Undefined
  Depth: 8-bit
  Channel depth:
    Red: 8-bit
    Green: 8-bit
    Blue: 8-bit
    Alpha: 1-bit
  Channel statistics:
    Pixels: 534141
    Red:
      min: 0  (0)
      max: 255 (1)
      mean: 183.641 (0.720159)
      median: 0 (0)
      standard deviation: 47.2679 (0.185364)
      kurtosis: 8.17643
      skewness: -2.70501
      entropy: 0.291751
    Green:
      min: 0  (0)
      max: 255 (1)
      mean: 189.764 (0.744172)
      median: 0 (0)
      standard deviation: 35.8089 (0.140427)
      kurtosis: 12.2553
      skewness: -2.71139
      entropy: 0.302268
    Blue:
      min: 0  (0)
      max: 255 (1)
      mean: 193.655 (0.759432)
      median: 0 (0)
      standard deviation: 33.8431 (0.132718)
      kurtosis: 14.3756
      skewness: -2.86106
      entropy: 0.305594
    Alpha:
      min: 255  (1)
      max: 255 (1)
      mean: 255 (1)
      median: 255 (1)
      standard deviation: 0 (0)
      kurtosis: 1.6384e+52
      skewness: 9.375e+35
      entropy: 0
  Image statistics:
    Overall:
      min: 0  (0)
      max: 255 (1)
      mean: 205.515 (0.805941)
      median: 63.75 (0.25)
      standard deviation: 29.23 (0.114627)
      kurtosis: 6.88995
      skewness: -1.86337
      entropy: 0.224903
  Rendering intent: Perceptual
  Gamma: 0.45455
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Matte color: grey74
  Background color: white
  Border color: srgb(223,223,223)
  Transparent color: none
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 813x657+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    date:create: 2022-03-09T13:41:58+00:00
    date:modify: 2022-03-09T13:41:59+00:00
    png:cHRM: chunk was found (see Chromaticity, above)
    png:gAMA: gamma=0.45455 (See Gamma, above)
    png:IHDR.bit-depth-orig: 8
    png:IHDR.bit_depth: 8
    png:IHDR.color-type-orig: 6
    png:IHDR.color_type: 6 (RGBA)
    png:IHDR.interlace_method: 0 (Not interlaced)
    png:IHDR.width,height: 813, 657
    png:pHYs: x_res=4724, y_res=4724, units=1
    png:sRGB: intent=0 (Perceptual Intent)
    png:text: 1 tEXt/zTXt/iTXt chunks were found
    signature: 8e2eb095d67562d697230e9aa7a74be5915a96ee755871069fb70b96b19fcc4c
    Software: Greenshot
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 38481B
  Number pixels: 534141
  Pixels per second: 52.2597MP
  User time: 0.016u
  Elapsed time: 0:01.010
  Version: ImageMagick 7.1.0-27 Q16-HDRI x64 2022-03-05 https://imagemagick.org
gerrat commented 2 years ago

Ok, I figured out how this fails.
If I create the {{filename.png|Title}} link first on the page, then save it, then click the attachment icon, it uploads the picture fine, and displays it.

It doesn't work if you click on Attachments, then upload the attachment, then create the {{filename.png|Title}} reference to the attachment after.

Closing, as this is more of a procedural issue.