No description
Find a file
2025-08-26 19:21:56 +08:00
.github/workflows chore: update deps 2025-08-26 14:22:40 +08:00
src chore: biome fixd 2025-08-26 19:21:56 +08:00
.gitignore add settings 2023-11-05 23:01:18 +08:00
biome.jsonc chore: biome fixd 2025-08-26 19:21:56 +08:00
bun.lock chore: update deps 2025-08-26 14:22:40 +08:00
esbuild.config.mjs chore: update deps 2025-08-26 14:22:40 +08:00
LICENSE update LICENSE 2023-11-14 13:52:53 +08:00
manifest.json docs: update readme.md and vision 1.1.0 2025-08-25 23:20:00 +08:00
package.json chore: biome fixd 2025-08-26 19:21:56 +08:00
README.md docs: update readme.md and vision 1.1.0 2025-08-25 23:20:00 +08:00
README_ZH.md docs: update readme.md and vision 1.1.0 2025-08-25 23:20:00 +08:00
styles.css add settings 2023-11-05 23:01:18 +08:00
tsconfig.json chore: biome fixd 2025-08-26 19:21:56 +08:00
version-bump.mjs fix: output URL requires "decodeURIComponent" 2024-06-11 16:11:08 +08:00
versions.json docs: update readme.md and vision 1.1.0 2025-08-25 23:20:00 +08:00

obsidian-attachment-uploader

This Obsidian plugin helps you upload local attachments to cloud storage. You can customize the upload shell command and specify which attachment formats to upload.

中文文档

Features

  • Custom shell command for uploading
    • Built-in uPic upload command: /Applications/uPic.app/Contents/MacOS/uPic -o url -u %s
    • Built-in Picsee upload command: "/Applications/Picsee.app/Contents/MacOS/Picsee -u %s"
  • Customizable attachment formats to upload
  • Option to delete original attachments after upload
  • Automatic upload when pasting or dragging from outside Obsidian

Installation

  1. In Obsidian, open the plugin manager
  2. Search for "obsidian-attachment-uploader"
  3. Click "Install", then enable and configure after installation

Configuration

  1. Install an image hosting tool (with shell upload command) or create a custom shell upload command
  2. Configure the Obsidian attachment uploader plugin:
    • Upload Command: Configure the shell command for uploading attachments
    • Attachment Formats to Upload: Configure which attachment formats to upload (separated by line breaks)
    • Delete Original After Upload: Configure whether to delete original attachments after upload
  3. Custom command examples:
    • uPic shell execution command: /Applications/uPic.app/Contents/MacOS/uPic -o url -u /local.png
    • Shell output format:
      Uploading ...
      Uploading 1/1
      Output URL:
      https://r-w.oss-cn-shanghai.aliyuncs.com/uPic/Snipaste_2024-08-18_22-14-14.png?x-oss-process=image/auto-orient,1/quality,q_80/format,webp
      
    • This plugin uses %s to replace the local image path and extracts the image URL from shell output using urlMatch = stdout.match(/\s+(https?:\/\/\S+)/)
    • Therefore, the uPic command should be: /Applications/uPic.app/Contents/MacOS/uPic -o url -u %s
    • If writing your own upload script, make sure to print the uploaded image's network URL in the shell output

Usage

  1. Open a note containing attachments in Obsidian
  2. Press command+p to open the command palette and type Upload editor attachments, or use the Ribbon button

Credits

  • Inspired by typora image upload functionality