Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

Last modified 2 years ago

#2153 closed defect (worksforme)

Display of images which are uploaded as attachments

Reported by: Stephane Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: 0.9b2
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Hi I installed trac 0.9b2 and created a instance.

The main page is:

http://localhost:8000/env/wiki/WikiStart

Now I use the Attach File Button to add 2 files called:

  • logopng.png
  • logo.jpg

Now I add the following text at the beginning of my WikiStart:

[attachment:logo.jpg]

http://localhost:8000/env/attachment/wiki/WikiStart/logopng.png

http://localhost:8000/env/attachment/wiki/WikiStart/logo.jpg

http://www.edgewall.com/gfx/trac_example_image.png

The only one which works where I see an image is the link to http://www.edgewall.com

I suppose the localhost:8000 with port number is the problem.

But anyway, the only form which is really usable is the first form: [attachment:logo.jpg].

It would be nice if it worked just out of the box, like in the MoinMoin wiki

Note: I don't know if this ever worked so perhaps its an enhancement

Attachments (0)

Change History (6)

comment:1 by Christian Boos, 19 years ago

Should be:

[attachment:logo.jpg?fmt=raw]

http://localhost:8000/env/attachment/wiki/WikiStart/logopng.png?fmt=raw

http://localhost:8000/env/attachment/wiki/WikiStart/logo.jpg?fmt=raw

comment:2 by Christopher Lenz, 19 years ago

Milestone: 0.9
Resolution: worksforme
Status: newclosed

Also, you should use the Image macro.

comment:3 by Stephane, 19 years ago

Aahh thanks:

The following works:

[[Image(logo.jpg)]]

But all of the following doesnt work:

  • The first one show me a link logo.jpg?fmt=raw
  • the 2 last ones are shown as pure text
    [attachment:logo.jpg?fmt=raw]
    
    http://localhost:8000/env/attachment/wiki/WikiStart/logopng.png?fmt=raw
    
    http://localhost:8000/env/attachment/wiki/WikiStart/logo.jpg?fmt=raw
    

Did you test it on a local installation a la http://localhost:8000/xxxxx ?

Perhaps the ":" between localhost and 8000 fools the Wiki???

comment:4 by Christian Boos, 19 years ago

My mistake:

(1) [attachment:logo.jpg?format=raw The logo]

(2) http://localhost:8000/env/attachment/wiki/WikiStart/logopng.png?format=raw

(3) http://localhost:8000/env/attachment/wiki/WikiStart/logo.jpg?format=raw

It was format=raw, not fmt=raw.

And (1) is used to create a textual links to the raw document itself, instead of its attachment page.

(2) and (3) do what you want, but with much less flexibility than by using the [[Image]] macro. Those forms will be deprecated in the next versions.

comment:5 by anonymous, 19 years ago

Maybe the WikiFormatting page should be updated to suggest the Image macro?

comment:6 by Christian Boos, 19 years ago

Done.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


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