notion-to-md
notion-to-md copied to clipboard
Enhance media handler to handle Notion Database and Notion Page properties
It works perfectly for me! My one question is can the
downloadMediaalso be made to handle the properties so that image URLs are also processed through an option?
Originally posted by @Anahkiasen in #26
@Anahkiasen This is live on alpha.5 release. This happens by default now, you can further go ahead and configure it to be selective. For that I have added enabledFor property in the configuration. Also, check out comprehensive example in the latest blog post about media handlers.
@souvikinator Been using this for some time now it's working great! My only question was whether transformImagePath should run on the page properties as well to be able to modify the image names? Some of them are too long with all the query parameters
Hey @Anahkiasen, I think you meant transformPath in the Media handling strategies. The good part is that v4-alpha.5 onwards, all media handling strategies work for all the media, be it block, page_properties or database_properties, and you can configure them as well with an additional property called enableFor.
By default, it works for all three. You can find more details overe here: https://notionconvert.com/docs/v4/concepts/configuration/#download-strategy
Maybe I'm just doing something wrong I'll double check, I have to download some of the same medias myself so I wanted the filenames to match to avoid redownloads, but I often end up with images having a _0_Image suffix when downloaded through the package, which I can't seem to remove. But now that I write it down I think I may have just thought a way that avoids me having to download some medias myself so I think this is more of an edge case/me problem. 😅 Otherwise everything works perfectly as described here 👍