Feature: display artwork directly without adding it to the database
jvolker opened this issue · 3 comments
There is currently no way to push artwork directly and temporarily to the frame without adding artwork to the database. The following is a workaround (creating, pushing, deleting) which requires a short delay before deleting the artwork again:
OF.artwork.create(artwork).then((result) => {
let artworkId = result.id
OF.frames.updateCurrentArtwork(frameId, artworkId).then(() => {
setTimeout(() => {
OF.artwork.delete(artworkId)
}, 500) // wait to make sure the artwork gets passed to the frame before deleting the artwork
})Would be great if this was implemented more cleanly into the API.
Pushing artwork to the frame without adding to the database sort of breaks the whole architecture. Can you elaborate on the use case?
This is related to the web clipper I'm currently working on as discussed here: https://groups.google.com/forum/#!topic/openframeio/-gGuklcwWV4
I would like to add a button to "view on frame" in addition to "add to own collection". The need came up while working on an extension that can display sketches from Openprocessing.org. Openprocessing.org is an archive with more than 700k sketches/artworks. As there are so many sketches of varying quality, I realised it would be good to test (see and interact with a touchscreen, in my case) them quickly before permanently adding them to my own collection.
I guess it would be cleaner to wait for some feedback/callback from the frame after it has received the artwork. After that, the artwork could be deleted safely from the server.
Is the frame returning that kind of feedback to the server and is it possible to listen to that event from elsewhere?