Jirico
Jirico

Reputation: 1262

Paperclip giving wrong URL

Iḿ using Paperclip 4.1.1 with default url and path. The problem is, when I try to get the image url, like that:

Picture.first.image.url

It returns:

"/system/pictures/images/000/000/001/original/narnia-5.jpg?1393114864" 

But that url is wrong there is no ?1393114864, the name is just "narnia-5.jpg". And I did not set any path or url, I'm using paperclip default options. How do I fix that? And why is paperclip giving me that unexistent suffix code?

Upvotes: 0

Views: 593

Answers (1)

simaofreitas
simaofreitas

Reputation: 1415

That is the timestamp of the field updated_at. It is there for caching purposes. By default, it is turned on in paperclip. If you don't want it, you can just pass this option in your attachment definition:

use_timestamp: false

Upvotes: 3

Related Questions