Pretty location not working with download endpoint

Hi! I’m sure I’m missing something stupid…

In my uploader class I have this:

class ImageUploader < Shrine
plugin :pretty_location
plugin :download_endpoint, prefix: "images", host: "https://#{Settings.asset_host}"

Then I use the .download_url method to get the image URL including the CDN host. The download URL looks like this though:

I would like to have a URL like<identifier>/filename.extension

The pretty_location plugin doesn’t seem to be working at all.

What am I missing?


I am trying with the generate_location method as well but the record id (identifier) is still nil at that stage because the record is not persisted yet. Is this why the plugin isn’t working properly?

I’m stupid :smiley:

If I try “Save As” the filename is correct. Nevermind :smiley: