Customize Upload #6025
Unanswered
Spy-Shifty
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi y'all,
I'm using the 3.0 beta and I'm pretty new to Payload CMS.
I want to customize the upload functionality of a collection. My intention is to upload glTF files which I want to edit before uploading them. So, I want to be able to set the position, rotation, and scale of the model and store that as a set of fields in the database document (not the file).
Therefore, I want an edit button, like the "Edit Image" button, to modify and preview (using Three.js) the model in a modal view. I also want to store a thumbnail of the rendered model.
The only way to do this is to create a custom EditView Component as shown in the docs. This requires me to set it under:
But this means I have to re-implement the overall default behavior of the DefaultEditView.
I also have to write a custom upload component, but this shouldn't be the issue...
Is this the right way to go? Or can I just override the upload component of the collection in some way?
(Maybe a feature request?)
By the way... I want to optimize the uploaded glTF file on the server side, similar to what the gltfjsx module does.
Thank you in advance ;)
Beta Was this translation helpful? Give feedback.
All reactions