WebDAV Image Uploader

by ste
5
4
3
2
1
Score: 47/100

Description

The WebDAV Image Uploader plugin streamlines how images are handled by moving them from local storage to a connected WebDAV server and swapping them with clean preview links. It intercepts pasted or dragged images, uploads them automatically, and inserts the corresponding link right into your note. You can also right-click to upload, download, or delete individual files, and even run batch operations to process every image across your vault. There's flexibility to keep or remove local copies, and while authentication quirks mean previews sometimes behave differently, the plugin provides options to manage that too.

Reviews

No reviews yet.

Stats

14
stars
1,670
downloads
8
forks
414
days
97
days
97
days
4
total PRs
1
open PRs
0
closed PRs
3
merged PRs
9
total issues
2
open issues
7
closed issues
34
commits

RequirementsExperimental

  • A WebDAV server with valid credentials

Latest Version

3 months ago

Changelog

  • Add Direct link (Custom domain) support. (#12)

README file from

Github

WebDAV Image Uploader

This is an Obsidian (https://obsidian.md) plugin for managing local images by storing them on WebDAV server, and previewing them via links (![]()):

sample

Features

Upload, Download, and Delete Files

  • When pasting or dragging images into a note, the plugin will intercept the action, upload the image to the WebDAV server according to the configured path format (Plugin Settings -> Basic -> Path Format), and then insert a preview link for the image (![file](https://yourdomain.com/dav/path/to/file.jpg)). You can enable/disable it in the plugin settings, or execute WebDAV Image Uploader: Toggle auto upload command.
  • You can also right-click on a local image link (![file](https://raw.githubusercontent.com/Koishiiko/obsidian-webdav-image-uploader/HEAD/attachments/file.jpg)) and select the Upload file to WebDAV option from the menu to upload the image and insert the link. You can configure whether to keep the local file after a successful upload.
  • When right-clicking a preview link, you can select Download file from WebDAV to download the image locally. The path is related to your Obsidian configuration (Settings -> Files & Links).
  • When right-clicking a preview link, you can select Delete file from WebDAV to delete the image from the WebDAV server and remove the link from the note.
  • When right-clicking a preview link, you can select Rename file from WebDAV to rename(move) the image from the WebDAV server.

Batch Upload/Download

In the Plugin Settings -> Commands, some buttons are provided for batch uploading and downloading images:

  • Read all notes in the vault, and upload all local images (![file](https://raw.githubusercontent.com/Koishiiko/obsidian-webdav-image-uploader/HEAD/attachments/file.jpg)) to the WebDAV server.
  • Read all notes in the vault, and download all remote images (![file](https://yourdomain.com/dav/...)) to locally.

In the file explorer, you can:

  • Right-click on a file, and upload/download all images in this file to/from WebDAV.
  • Right-click on a folder(attachment folder), and upload all images in this folder to WebDAV.
  • Right-click on a folder, and upload/download all images in this folder's notes to/from WebDAV (including subfolders).

Batch Process Log

After performing batch upload/download operations, a log file named webdav-batch-log-<timestamp>.md will be created in the vault's root directory. This log file records the results of each file processed during the batch operation, you can check it to see which files were successfully processed and which ones failed. And you can enable/disable this feature in the plugin settings.

Note: These batch process features have not been thoroughly tested (only run once in my vault). Please be sure to back up your vault before running them to prevent damage due to bugs.

Dummy PDF

When Settings -> Enable Dummy PDF is enabled, the plugin will create a Dummy PDF file after PDF file is uploaded, then you can preview the PDFs stored on WebDAV server by PDF++ plugin. You can also upload/download/delete PDF files in the same way as other files. (Thanks the idea from here)

More details about the new features can be found in the Release Page.

Others

About Image Preview

WebDAV may require Http Authentication to verify permissions when accessing files. But Obsidian (CodeMirror) does not seem to provide an API to add request headers for requests sent by ![](). Therefore, this plugin manually fetching and displaying the images. This display behavior differs from Obsidian's default behavior and may result in loading failures (in rare cases), and it doesn't work in other cases (like reading mode or image properties).

If you don't like this feature, you can disable it in the plugin settings (and restart Obsidian), then configure your server to allow image access (or simply disable authentication). For example, you can identify Obsidian's requests using the following headers:


# desktop app
User-Agent: obsidian/x.x.x

# mobile app
X-Requested-With: md.obsidian

So we can identify these requests in Nginx like this:

# concat the headers and match "obsidian", return the token if matched
map "$http_user_agent|$http_x_requested_with" $obsidian_header {
    default $http_authorization;
    # generate your token by encoding "username:password" in base64 format:
    # $> echo -n "username:password" | base64
    "~*obsidian" "Basic {TOKEN}";
}

server {
    # ...
    location /obsidian {
        proxy_set_header Authorization $obsidian_header;
        # ...
    }
}

Then you don't need to use this plugin's account settings and the preview feature. If you have a better solution, pull requests are welcome.

About This Plugin

This plugin was primarily written for my personal use to replace the image-auto-upload plugin, due to it requires running an additional PicGo locally, and it does not offer a feature to upload images for the entire vault (I have thousands of notes needs to process).

After trying my plugin out for a few days, I feel that it already meets my needs: uploading all images to WebDAV (even though it only ran once), and then easily uploading and downloading images within notes (with the ability to conveniently delete them when something goes wrong).

Inspired by

obsidian-image-auto-upload-plugin

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Webdav File Explorer
3 years ago by red0orange
Image Classify Paste
3 years ago by tianfx
Copy Image
3 years ago by Felipe D.S. Lima
Easily copy image to clipboard by right clicking image.
Hash Pasted Image
2 years ago by Minh Vương
Auto rename pasted images added to the vault via hash algorithm SHA-512
Imgur
6 years ago by Kirill Gavrilov
Pastes images right to imgur.com
Enhanced Image
2 years ago by situ2001
Enhance the experience of image in Obsidian, seamlessly.
Pixel Perfect Image
2 years ago by Johan Sanneblad
Pixel perfect 100% image resizing, copy to clipboard, show image in Finder/Explorer, and much more.
Image Size
2 years ago by Jie Zhang
Set the default size for pasted images.
Enhanced Publisher
a year ago by Cube
增强的Obsidian发布插件,支持图片自动存储、HTML预览和发布到微信公众号等内容平台
Cloud sync
a year ago by Bing
一款强大的 Obsidian 同步插件,支持将笔记自动同步到多种云盘服务,提供端到端加密保护,让您的笔记既安全又便捷。
Nutstore Sync
10 months ago by nutstore-dev
WebDAV Explorer
6 months ago by 蓝星晓夜
WebDAV Server Explorer.
JSON-CSV Importer
2 months ago by farling42
Plug-in for Obsidian.md which will create Notes from JSON files
Image Converter
2 months ago by xryul
⚡️ Convert, compress, resize, annotate, markup, draw, crop, rotate, flip, align images directly in Obsidian. Drag-resize, rename with variables, batch process. WEBP, JPG, PNG, HEIC, TIF.
Attachment Uploader
2 months ago by zhuxining
An attachment uploader plugin for Obsidian
Sync Engine
a month ago by Hēsperus
🔄 The fast and extensible synchronization engine for Obsidian.
inBox Sync
a month ago by maoruibin
inBox 笔记的 Obsidian 插件
Imagine
a month ago by albusguo
A comprehensive image management plugin for managing, inserting, resizing, viewing, and batch processing images.
PixNote
a month ago by Sofia Milton
Add Attachment
6 days ago by olegg90
Obsidian plugin for adding multi attachments