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

Upload a picture into a document #153

Closed
benel opened this issue Mar 12, 2024 · 10 comments
Closed

Upload a picture into a document #153

benel opened this issue Mar 12, 2024 · 10 comments
Labels

Comments

@benel
Copy link
Member

benel commented Mar 12, 2024

For now, it is possible from a document to refer to a picture in Markdown:

![Description](https://elsewhere/MyPicture)

However this picture must be already on a distant server.

The idea, for example, would be to drag and drop a picture (like in GitHub issues or discussions). It would be then stored in CouchDB as an attached file of the document chunk and a markdown reference would be automatically created in the document.

@benel benel added the feature label Mar 12, 2024
@nitram35
Copy link
Contributor

nitram35 commented Mar 13, 2024

Cette fonctionnalité serait utile afin de visualiser des diagrammes, ceci en permettant via l'interface de les ajouter (cas utile pour IF14)

@christophe-lejeune
Copy link
Member

If you rest on a library to format the documents (for instance easymde for markdown rendering), you can use it to include images into the documents. I have not tested this feature, but the documentation mentions the drag-and-drop behavior.

However, using such a library have drawbacks. AFAIK, the images will be included in documents; this will produce large documents and the database will quickly grow. That's why I have personally not enabled this feature into Cassandre.

@nitram35
Copy link
Contributor

Image

@petitfa1
Copy link
Contributor

petitfa1 commented May 19, 2024

Phase 1

  • Scenarios (Gherkin)
  • Mockups
  • Implementation strategy

Phase 2

  • Acceptance tests (Capybara)
  • Implementation

Phase 3

  • Screencast

@petitfa1
Copy link
Contributor

Image

raphaelweis added a commit that referenced this issue May 19, 2024
Co-Authored-By: petitfa1 <[email protected]>
Co-Authored-By: Louis Duhal Berruer <[email protected]>
Co-Authored-By: Barnabepetit <[email protected]>
Co-Authored-By: Martin Gandon <[email protected]>
@Barnabepetit
Copy link
Contributor

Image

@raphaelweis
Copy link
Contributor

raphaelweis commented May 22, 2024

Implementation strategy :

  • First we looked at how to PUT and GET attachments from couchdb, which allows us to store and retrieve pictures as attachments from an http client such as postman
  • With this knowledge, we can now implement the UI for Adding pictures, which consists in :
    • adding a button according to the Mockup above
    • then making the correct API call to create an attachment
    • then when the attachment is added to the database, display it by integrating key = "text" with value="URL in Md format -->(http://localhost:5984/hyperglosae/document_id/myimage.png)'" in the document in the database. The value as the format for displaying with markdown

raphaelweis added a commit that referenced this issue May 22, 2024
Co-Authored-By: petitfa1 <[email protected]>
Co-Authored-By: Louis Duhal Berruer <[email protected]>
Co-Authored-By: Barnabepetit <[email protected]>
Co-Authored-By: Martin Gandon <[email protected]>
raphaelweis added a commit that referenced this issue May 22, 2024
Co-Authored-By: petitfa1 <[email protected]>
Co-Authored-By: Louis Duhal Berruer <[email protected]>
Co-Authored-By: Barnabepetit <[email protected]>
Co-Authored-By: Martin Gandon <[email protected]>
raphaelweis added a commit that referenced this issue May 22, 2024
Co-Authored-By: petitfa1 <[email protected]>
Co-Authored-By: Louis Duhal Berruer <[email protected]>
Co-Authored-By: Barnabepetit <[email protected]>
Co-Authored-By: Martin Gandon <[email protected]>
raphaelweis added a commit that referenced this issue May 22, 2024
Co-Authored-By: petitfa1 <[email protected]>
Co-Authored-By: Louis Duhal Berruer <[email protected]>
Co-Authored-By: Barnabepetit <[email protected]>
Co-Authored-By: Martin Gandon <[email protected]>
@Barnabepetit
Copy link
Contributor

Barnabepetit commented May 22, 2024

Image

raphaelweis added a commit that referenced this issue Jun 5, 2024
raphaelweis added a commit that referenced this issue Jun 5, 2024
Co-Authored-By: petitfa1 <[email protected]>
Co-Authored-By: Louis Duhal Berruer <[email protected]>
Co-Authored-By: Barnabepetit <[email protected]>
Co-Authored-By: Martin Gandon <[email protected]>
raphaelweis added a commit that referenced this issue Jun 5, 2024
raphaelweis added a commit that referenced this issue Jun 5, 2024
raphaelweis added a commit that referenced this issue Jun 7, 2024
raphaelweis added a commit that referenced this issue Jun 7, 2024
raphaelweis added a commit that referenced this issue Jun 7, 2024
raphaelweis added a commit that referenced this issue Jun 7, 2024
raphaelweis added a commit that referenced this issue Jun 7, 2024
@nitram35 nitram35 closed this as completed Jun 7, 2024
raphaelweis added a commit that referenced this issue Jun 7, 2024
Co-Authored-By: petitfa1 <[email protected]>
Co-Authored-By: Louis Duhal Berruer <[email protected]>
Co-Authored-By: Barnabepetit <[email protected]>
Co-Authored-By: Martin Gandon <[email protected]>
raphaelweis added a commit that referenced this issue Jun 7, 2024
raphaelweis added a commit that referenced this issue Jun 7, 2024
@nitram35 nitram35 reopened this Jun 7, 2024
raphaelweis added a commit that referenced this issue Jun 7, 2024
raphaelweis added a commit that referenced this issue Jun 7, 2024
raphaelweis added a commit that referenced this issue Jun 7, 2024
raphaelweis added a commit that referenced this issue Jun 12, 2024
raphaelweis added a commit that referenced this issue Jun 12, 2024
raphaelweis added a commit that referenced this issue Jun 12, 2024
raphaelweis added a commit that referenced this issue Jun 12, 2024
raphaelweis added a commit that referenced this issue Jun 12, 2024
raphaelweis added a commit that referenced this issue Jun 12, 2024
raphaelweis added a commit that referenced this issue Jun 12, 2024
raphaelweis added a commit that referenced this issue Jun 12, 2024
raphaelweis added a commit that referenced this issue Jun 12, 2024
raphaelweis added a commit that referenced this issue Jun 12, 2024
benel pushed a commit that referenced this issue Jun 19, 2024
benel pushed a commit that referenced this issue Jun 19, 2024
benel pushed a commit that referenced this issue Jun 19, 2024
nitram35 added a commit that referenced this issue Jun 19, 2024
nitram35 added a commit that referenced this issue Jun 19, 2024
nitram35 added a commit that referenced this issue Jun 19, 2024
Co-Authored-By: petitfa1 <[email protected]>
Co-Authored-By: Louis Duhal Berruer <[email protected]>
Co-Authored-By: Barnabepetit <[email protected]>
Co-Authored-By: Martin Gandon <[email protected]>
nitram35 added a commit that referenced this issue Jun 19, 2024
nitram35 pushed a commit that referenced this issue Jun 19, 2024
nitram35 added a commit that referenced this issue Jun 19, 2024
nitram35 added a commit that referenced this issue Jun 19, 2024
Co-Authored-By: petitfa1 <[email protected]>
Co-Authored-By: Louis Duhal Berruer <[email protected]>
Co-Authored-By: Barnabepetit <[email protected]>
Co-Authored-By: Martin Gandon <[email protected]>
nitram35 added a commit that referenced this issue Jun 19, 2024
raphaelweis added a commit that referenced this issue Jun 19, 2024
Co-Authored-By: petitfa1 <[email protected]>
Co-Authored-By: Louis Duhal Berruer <[email protected]>
Co-Authored-By: Barnabepetit <[email protected]>
Co-Authored-By: Martin Gandon <[email protected]>
raphaelweis added a commit that referenced this issue Jun 19, 2024
raphaelweis added a commit that referenced this issue Jun 19, 2024
@benel
Copy link
Member Author

benel commented Aug 29, 2024

Merged as 597670f.

@benel benel closed this as completed Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

6 participants