Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Attachment problem

Quote Reply
Attachment problem
Can somebody with too much time on their hands help me troubleshoot something?

http://www.heavybombers.com/.../gossamer/gforum.cgi

Feel free to test post as it's not linked into my main site and won't be until after more testing.

Example post: http://www.heavybombers.com/...r/gforum.cgi?post=8;

Click on its attachment which generates this URL result:
http://www.heavybombers.com/...chment;postatt_id=1;

For some reason, it's inserting the "/filename.jpg", with it extracted the URL is correct.

i.e, http://www.heavybombers.com/...chment;postatt_id=1; does link correctly to the file.

I've done something wrong somewhere right? I looked at my Attachments setup options but didn't spot anything obvious. Everything else seems to be working like a champ.

Dazed and confused,

Last edited by:

heavybombers: Nov 19, 2001, 5:08 PM
Quote Reply
Re: [heavybombers] Attachment problem In reply to
In Reply To:
http://www.heavybombers.com/cgi-bin/gossamer/gforum.cgi/matalin_carville.jpg?do=post_attachment;postatt_id=1;
That works with Apache :) Not sure if it's a IIS problem, but I'll check it out. I'll have to talk to Jason about it to see the reasoning behind doing it like that.


Adrian
Quote Reply
Re: [brewt] Attachment problem In reply to
Have you made any progress on resolving this behavior on non-Apache servers? Still a problem in 1.1.0
Quote Reply
Re: [heavybombers] Attachment problem In reply to
Hi,

Can you look at your include_post_display.html template. At the end of the file in the loop displaying attachments you should see:

<%unless is_iis%>/<%postatt_filename_escaped%><%endunless%>

If not, try restoring your template to the original.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Attachment problem In reply to
Hi Alex, that's not a file I've modified. Am still using the original and it does include that string.

Code:
<%loop post_attachments%>
<tr<%unless printing%> bgcolor="<%medium_beige%>"<%endif%>>
<td align=right style="border-top: 1px solid <%dark_beige%>">
<%if first%>
<%body_font%>Attachments:<%/body_font%>
<%else%>
&nbsp;
<%endif%>
</td>
<td valign="top" style="border-top: 1px solid <%dark_beige%>">
<%body_font%>
<a href="gforum.cgi<%unless is_iis%>/<%postatt_filename_escaped%><%endunless%>?do=post_attachment;postatt_id=<%postatt_id%>;<%hidden_query%>">
<img src="<%GForum::Attachment::icon($postatt_content, $postatt_filename)%>" border=0>
<%postatt_filename%>
</a>
(<%GForum::Attachment::friendly_size($postatt_size)%>)
<%/body_font%>
</td>
</tr>
<%endloop%>

Quote Reply
Re: [heavybombers] Attachment problem In reply to
Hi,

Hmm, seems the is_iis is not working. For now, simply remove the part in red except for the ? at the end.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Attachment problem In reply to
That solution worked, thanks.
Quote Reply
Re: [heavybombers] Attachment problem In reply to
Hi,

You'll need to do the same thing on the private messages page.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [heavybombers] Attachment problem In reply to
This is fixed in 1.1.1 - actually, the fix is to take out the part in red (except for the question mark) entirely as it seems to work perfectly on all servers/browsers without it.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com