Generate file preview from urls

I migrated a Joomla forum to discourse.
I have a lot of posts with the text and the attachment with this raw field structure:
https://my-server/media/kunena/attachments/user-id/file-name

I would like to convert it in a more pretty UI:

but I’m unable to do this via console (post.save).
It’s possible only if I open the edit box for the message and save it again.

Someone has managed to achieve this?
Thanks for you help.

What I would do is modify the script to import those images as proper Discourse uploads.

If it’s too late for that, are these URLs on a line by themselves? Do the images show up if you do a “rebuild html”?

thanks, can you help me to understand how to create an upload via script for a post for example?

I think the vBulletin script does attachment uploads as do several others. Just grep they script directory for “upload”.

1 Like