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

[feature] embed images #27

Closed
6 tasks done
individual-it opened this issue Feb 27, 2024 · 4 comments · Fixed by #60
Closed
6 tasks done

[feature] embed images #27

individual-it opened this issue Feb 27, 2024 · 4 comments · Fixed by #60
Assignees
Labels
enhancement New feature or request P1 High Priority

Comments

@individual-it
Copy link
Member

individual-it commented Feb 27, 2024

As a user
I want to use images in my presentation
So that I can have more than only text in the presentation

As a user
I want to use images that are stored in oCIS in my presentation
So that I don't have to upload them or base64 encode them in the presentation

As a public viewer of the presentation
I want to see embedded images in the presentation
So that the presentation looks the same when viewed through a public like like if viewed as logged in user

As a user
I don't want a public viewer to see images that are not publicly shared
So that no private data is leaked

To fulfill the requirements I suggest:

  1. allow to embed images that are stored in the same folder or its subfolders by using the markdown image syntax
  2. not allowing to embed files from a folder of higher levels
  3. require the whole folder be publicly shared if the public viewer should see the images
  4. if only the markdown file is publicly share the viewer should not be able to access the images

Open Tasks:

@grgprarup grgprarup added the P2 Medium Priority label Feb 28, 2024
@saw-jan saw-jan self-assigned this Feb 29, 2024
@koebel
Copy link
Contributor

koebel commented Mar 1, 2024

A benefit of this feature request is to reduce file size of the presentation .md file. Plus, if I use an image (e.g. a diagram) multiple times in the presentation and notice an error, I only need to update the source and it should update all instances where this image is used

@individual-it
Copy link
Member Author

partly workaround for now:

![intellij.png](https://ocis.in-nepal.de/remote.php/dav/public-files/sZWQDOGTMyigDVy/intellij.png)

@saw-jan
Copy link
Member

saw-jan commented Mar 5, 2024

I have done some work on it and these are the findings:

  1. There's a way to convert image path to full url with revealjs and marked:
    ./cool.png -> https://localhost:9200/dav/spaces/<id>/cool.png

    • ❌ needs authorized request
  2. Sign the image urls: (working) ✔️
    Requires:

    • Unwrap Presentation component
    • Manually add header, sidebar, and other components
    • Modify img elements' src rendered by revealjs

    Limitations:

    • only files at .md file level can be read

I will try to implement option 2 for the first iteration.

@koebel koebel added P1 High Priority enhancement New feature or request and removed P2 Medium Priority labels Mar 18, 2024
@saw-jan
Copy link
Member

saw-jan commented Apr 5, 2024

  • Unwrap Presentation component
  • Manually add header, sidebar, and other components

I was wrong here. works without removing AppWrapper

import {  useAppDefaults } from '@ownclouders/web-pkg'

const appDefaults = useAppDefaults({ applicationId: '<app-id>' })

// mounted
// this loads the files
await appDefaults.loadFolderForFileContext(unref(currentFileContext))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P1 High Priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants