Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/image-input #337

Merged
merged 13 commits into from
Dec 9, 2024
Merged

Feat/image-input #337

merged 13 commits into from
Dec 9, 2024

Conversation

danielo515
Copy link
Owner

@danielo515 danielo515 commented Dec 9, 2024

This adds a new input specific for images.
This will import the image into your vault and give you a reference to the generated TFile

Fixes #241 (at least for images)

@danielo515 danielo515 merged commit df15fbe into master Dec 9, 2024
2 checks passed
@danielo515 danielo515 deleted the feat/image-input branch December 9, 2024 16:11
@dxcore35
Copy link

dxcore35 commented Dec 9, 2024

Can we make that i can import any file not just image? Just let it general file picker, regardless what the file is.
Here I use image as example, it can video, markdown, pdf etc... #241

Thank you for implementation! The modal form is top10 obsidian plugin!

@danielo515
Copy link
Owner Author

I would prefer to have a separate input for that. I want to provide the best user experience, and the images deserve special treatment IMO.
Will add a generic file input as soon as I can

@dxcore35
Copy link

If this is the case, you should provide more functionality for this, like image optimization, convert it to jpg, change resolutions, etc.. in this case the separated modal make sense.

@danielo515
Copy link
Owner Author

@dxcore35 that could be done in the future, indeed, and the easiest way to pave that road is by starting it as a separate thing.

Do you mind opening a new issue detailing your expectations for the generic attachments?
For example, for the document and other attachments, I don't see the need to provide a naming template, and just using the file name is probably going to be enough.
Is a good idea to ask for attachment path too?
How should the link behave? IMO, it should be just a link, because arbitrary file types may not be embeddable. For images, for example, I think it usually makes more sense to embed them rather than just linking, but that is not the case for plain files.

@dxcore35
Copy link

#341

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File picker option
2 participants