I’m saving images to a database when uploaded, and I’m trying to display
the images back out in the views. I can get this to work, but it’s not
very consistent… Here’s what I’m doing:
Right off, it doesn’t show the images. But eventually it does, like if
I interact with the database again, or re-upload an image, they all seem
to work. This seems to be my problem, when right-clicking on the
properties of the image, this is the url:
/picture/show/1.png?
And it should be:
/picture/show/1
How come this is appending “.png?” to the end of my image? Should this
be doing this? Please help, as the images HAVE to show up, and I’ve
tried everything I can think of. Thanks!
I’m saving images to a database when uploaded, and I’m trying to display
the images back out in the views. I can get this to work, but it’s not
very consistent… Here’s what I’m doing:
Right off, it doesn’t show the images. But eventually it does, like if
I interact with the database again, or re-upload an image, they all seem
to work. This seems to be my problem, when right-clicking on the
properties of the image, this is the url:
/picture/show/1.png?
And it should be:
/picture/show/1
How come this is appending “.png?” to the end of my image? Should this
be doing this? Please help, as the images HAVE to show up, and I’ve
tried everything I can think of. Thanks!
The image_tag helper will append .png if there is no extension in the
url since it thinks all of your image should be files.
The best way around this is create a custom route that looks like an
image file.
Is there any way to emulate that :id.jpg routing functionality without
edge rails? I can’t justify edge for only that, but would really like
.jpg extensions on the images.
Is there any way to emulate that :id.jpg routing functionality without
edge rails? I can’t justify edge for only that, but would really like
.jpg extensions on the images.