Creating thumbnail
For both creating thumbnail, a microservice "image-service" is now availableand accessing slide thumbnails, we are currently using the file-service microservice. This service provides a POST method, expecting two parameters: filename without extension and html content that a developer wants to convert into an imagethe slide id and the HTML content for the slide. The final image slide thumbnail will be a PNG JPEG file.
If the html HTML to image conversion is successful, the service will return the URL of the created image. If there is error, it will return the error response.
...
On slidewiki-platform, there is a Thumbnail component that can be used to display a thumbnail image. Developers can use this component inside their other components. One should loop over it to show multiple components (see DeckView component for example use). Use CSS for positioning etc. as needed. This component takes url property as mandatory property. The thumbnail image URL has following URL path:
Code Block |
---|
/{userid}slideThumbnail/thumbnails/{filenameslideId}.pngjpeg |
Example:
Code Block |
---|
<a href={deckURL + '/slide/' + slide.id} className="ui medium image" tabIndex="-1"> <Thumbnail key={index} url={thumbnailURL + slide.user + '/thumbnailsslideThumbnail/' + slide.id + '.pngjpeg'} slideId={slide.id} /> </a> |
...