Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Inserting assets (pdf) into body field creates a link to the thumbnail image, but not a link to download the file. #341

Closed
hadiS opened this Issue · 10 comments

3 participants

@hadiS

Is this intended behaviour?

@saturnflyer
Owner

Would you please elaborate?
What code is there in the body?

@hadiS

There is no code at all in the body. Just content text. I tried this locally and also on the radiant demo site http://radiantcms.org/demo/ .
I uploaded a pdf in the assets section and on a page I insert the asset/pdf in the body content.
This is what gets inserted
<r:asset:link size="normal" id="2" />

Now when I view the site I see a link, but the link redirects me to an image instead to the actual pdf.
I hope I was clear enough.

@SamWhited
Collaborator
@hadiS

I used the 'insert' link which Radiant 1.0 provides. It automatically adds <r:asset:link size="normal" id="x" /> , but it is not a link to the pdf itself, but the link to an image.

@saturnflyer
Owner

Can you tell us what the HTML output of that is? And have you verified that what has been uploaded is a PDF and not an image?
Have you checked the generated files to see if there is some error with them?
Have you tried changing it to size="original" or just removing the size to see how that affects it?

With more information, we'll be able to determine if this is an actual bug.

@SamWhited
Collaborator
@hadiS

@saturnflyer @SamWhited Yes, removing the size attribute helped. Should radiant not detect the file type automatically and hence add the radius tag without/with the size attribute respectively when using 'insert' ?

Thanks for the help.

@saturnflyer
Owner

That's probably a good idea. I haven't worked on this code, but let's leave the issue open to address that.

@SamWhited
Collaborator

This is more of an issue with the Clipped extension; would it be better to open a bug report there?

EDIT: Something simple like this might solve the problem – SamWhited/radiant-clipped-extension@4965856

@SamWhited SamWhited referenced this issue in radiant/radiant-clipped-extension
Open

Ignore default size for non-image when inserting asset #67

@SamWhited
Collaborator

Closing this issue since it's 'solved' as far as Radiant is concerned. I made a new issue against the Clipped extension here: radiant/radiant-clipped-extension#67

@SamWhited SamWhited closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.