Replies: 7 comments 2 replies
-
Hi @babeal, I had some plans to try extend the plugin with an ability to use arbitrary API of any other images hosting. To turn this plugin into a powerful http client and make it possible to extract any response from an API to compose URL to a just uploaded image. This feels like a lot of work, especially if we keep in mind that each API can have different type of authentication. I do not feel like I will have a time for this in foreseeable future. I see people fork the project and just implement the support for files/images hosting they need. I suggest you to do the same (fork). You will just need to implement your own obsidian-imgur-plugin/src/uploader/ImageUploader.ts Lines 1 to 3 in e526000 |
Beta Was this translation helpful? Give feedback.
-
@babeal what is the authentication method for S3? |
Beta Was this translation helpful? Give feedback.
-
I was thinking just about my workflow where it would use the cli or sdk profile already set up on the machine. That would work for all except mobile but I’m not sure if there is a mobile variant of obsidian. However it would be super easy to create a cdk stack that would deploy a serverless api that would use api keys and then everything would be http based for upload and then public for download. My reason for using s3 is that I own the aws account and bucket. So the images stay somewhat private. The s3 website serving the images would be public for the app to properly render but it would be difficult for someone to guess. I’m going to dive deeper into your code this week. Essentially image management is the only thing that would get me entirely off one note. |
Beta Was this translation helpful? Give feedback.
-
Ok, after looking at the code, you're right, S3 doesn't belong here without abstracting the top level interface to support different types of targets. So for the time being I'll fork and create a obsidian s3 plugin, but in the future we could work together for a general solution with many targets. Referencing my previous comment, the S3 one would work like the git plugin where it requires get to work. S3 would require aws cli or an aws profile to be setup. |
Beta Was this translation helpful? Give feedback.
-
Nooo, I am sure there must be some http API to upload files. I would not like to deal with IPC (Inter Process Communication) in my plugin. @babeal check out the following pages: |
Beta Was this translation helpful? Give feedback.
-
Of course there is, but you still need an access key & secret key encoded into a Sig4 format to include with the request. So a user would have to provide credentials to the application vs allowing aws profile to manage the credentials. It depends on how the account is setup, but if it's locked down then it only supports ephemeral credentials and has to exchange them over time which is easy to setup in aws profiles. |
Beta Was this translation helpful? Give feedback.
-
Would be better to keep the functionality in a separate plugin. Thanks for the quick responses |
Beta Was this translation helpful? Give feedback.
-
I just started using obsidian and had this exact idea except for using AWS s3 website instead of imgur. Would your code support this / be up for a pull request adding this target? I didn’t dive into the code yet so not sure if it would fit here or need to be a separate plugin
Beta Was this translation helpful? Give feedback.
All reactions