Skip to content

Preserve subfolder path when uploading google drive images #11

@bryanbcook

Description

@bryanbcook

Needs verification, but I suspect that if you had ![image](folder/image.png) in your markdown, the image would be uploaded as image.png.

This could create some confusion when uploading images to google drive as it will reuse the file name if it's already present. Consider adapting the upload logic to determine the relative path and then recursively create subfolders in google drive when uploading.

Example:

Files:

  • c:\dev\blog\attachments\subfolder\image.png
  • c:\dev\blog\posts\2025\file.md

Content:

---
title: ...
postid: ...
---
Here is an image ![image](attachments/subfolder/image.png)
cd c:\dev\blog
Import-Module PSBlogger
Publish-MarkdownBloggerPost -File .\posts\2025\file.md -AttachmentsDir .\attachments

Should upload images to <app-folder>/subfolder/image.png

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions