Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Automatically save scene thumbnail when saving scene for first time #264

Closed
kfarr opened this issue Sep 2, 2023 · 1 comment
Closed
Assignees

Comments

@kfarr
Copy link
Contributor

kfarr commented Sep 2, 2023

this auto generate feature:

  • A thumbnail should be automatically generated in a case where this is saving a new file for the first time. It should not be used with "save as" or "Remixing" an existing project. (In other words, it should only fire after a save action if the image path field in scene document is empty.)
  • This auto-generate feature should not fire on subsequent saves (after the initial thumbnail is created, user can update via capture share modal)
  • this should happen in the background without the user knowing
  • test to see if the file is black or empty? then to not upload but show console error? or show error message to user?
  • should be fired after the scene has been saved successfully first: this is much more likely to raise an error than saving the scene

pre-requisite:

  • store thumbnails as jpeg 320x240 at 50% quality, target size between 20-35kb
  • store using firebase storage
  • path of file: [Storage Root]/[Scene Document ID].jpg
  • after a successful upload on the thumbnail, the path to the thumbnail should be stored inside a field at the top level of the scene document named imagePath.
  • if a scene is remixed (save as) it should retain the existing imagePath field and NO new scene image should be created. Therefore it is ok if the scene doc ID does not match the image path ID. It will match again if / when the new author decides to create a new thumbnail.

server side considerations:

  • Auth / Rights: view: anyone can view, these are all public // update / create / delete: the author of a given scene document ID is the only user who has the authority to update / create / delete this jpg
  • the image should be permissive CORS, allow fetching from all domains, and accessible via https
@kfarr kfarr changed the title Save thumbnail (should this be UUID.jpeg)? (set as thumbnail) Save scene thumbnail when saving scene Sep 3, 2023
@kfarr kfarr changed the title Save scene thumbnail when saving scene Automatically save scene thumbnail when saving scene for first time Sep 3, 2023
@kfarr kfarr moved this from Backlog (Not Ready) to To Do - High Prio in 3DStreet Dev Tracking Nov 8, 2023
@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in 3DStreet Dev Tracking Nov 8, 2023
@ViktoriaShurhot ViktoriaShurhot moved this from To Do - High Prio to For Review in 3DStreet Dev Tracking Nov 23, 2023
@kfarr
Copy link
Contributor Author

kfarr commented Nov 24, 2023

closed by #345

@kfarr kfarr closed this as completed Nov 24, 2023
@github-project-automation github-project-automation bot moved this from For Review to Done in 3DStreet Dev Tracking Nov 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants