# Markdown画像URLのリバースエンジニアリング

**URL:** <https://meta.discourse.org/t/reverse-engineering-markdown-image-urls/226899>\
**Category:** Support\
**Created:** [2022 年 5 月 12 日午後 9:08 UTC](https://meta.discourse.org/t/reverse-engineering-markdown-image-urls/226899 "2022-05-12T21:08:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sören\_Geier](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/s%C3%B6ren_geier/32/235234_2.png) [@Sören\_Geier](https://meta.discourse.org/u/S%C3%B6ren_Geier)\
**Post date:** [2022 年 5 月 12 日午後 9:08 UTC](https://meta.discourse.org/t/reverse-engineering-markdown-image-urls/226899/1 "2022-05-12T21:08:45Z")

</div>

こんにちは。

WikiページをWordまたはPDFに出力する方法を調べています。まず「印刷」→「PDF」→「Word」のルートを試しましたが、単純な書式設定が失われてしまうことがわかりました。

そこで、`/raw/postId`ルートから取得できる生のMarkdownコードを扱いたいと考えています。  
しかし、`upload://zAO6UTQHweHZ84ErdHdsGMJpuK1.jpeg`のような、Discourseがページ読み込み時に解決してくれるような、わかりにくい画像URLが表示されます。

生のデータを見ているときに、画像が実際にホストされている、完全に絶対パスで表示されるようにしたいのです。あるいは、少なくともそれらの内部URLを処理するのに役立つスクリプトが必要です。

どなたか、正しい方向性を示していただけますでしょうか？  
よろしくお願いします。

---

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [2022 年 5 月 12 日午後 9:42 UTC](https://meta.discourse.org/t/reverse-engineering-markdown-image-urls/226899/2 "2022-05-12T21:42:58Z")

</div>

> [@Converting short upload URLs to full URLs](https://meta.discourse.org/t/converting-short-upload-urls-to-full-urls/131760):
>
> I may be barking up the wrong tree here, so apologies if I am - but any pointers very much welcome! There are some threads in our Discourse site which are displayed in part on our main website. Because the cooked version of a post contains all the HTML for the lightbox, which we don’t want on the main site, I’m working with the raw version of a post. One thing that’s tripping me up is the file upload URLs. How can I convert an upload:// URL to a full URL? I’ve tried searching and come across S…
