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

HDR image upload and moderation work + possible setup fixes #130

Merged
merged 18 commits into from
Jan 5, 2025

Conversation

CheesyLaZanya
Copy link
Collaborator

@CheesyLaZanya CheesyLaZanya commented Dec 28, 2024

Closes #125 , #121 , #122

Also attempts to fix some setup issues facing new setups.

For #125

Updates our image metadata retrieval endpoint to also use exiftools used by our image metadata cleanup endpoint, to successfully get metadata even from cleaned images.

This is currently used in the hdr image upload process, and after this change, instead of empty metadata we can successfully retrieve the metadata we are interested in:

image


For #121
Placeholder code has been added for future S3 bucket support, but it will need tested and enabled once available.

Assuming you were already setup with this project before, to test this change, you will need to add the new variables from the .env.template file to your .env file locally

## Docker compose variables
NODE_ENV=development
UPLOAD_DIR=./uploads

Then run task dev, and once the environment is running and you are signed in, you can upload a valid .dng file from the main page.

In the the root folder, in /uploads/pending, you will get the dng, and jpg preview, and a json file containing information about the upload.


For #122

If you are an admin and go to http://localhost:5173/admin/moderation you will see any .dng files in the 'pending' bucket of your uploads folder.

If you accept them, they will move to /uploads/accepted, and if you reject them, they will move to /uploads/rejected.

Initial S3 support is laid out but will need testing once an S3 bucket is made available to us.

image

…tion of files selected, success, and displaying of errors and things like clearing selected files after upload.

Signed-off-by: Zachary Licastro <[email protected]>
…clean out metadata, and save jpeg preview. Use utc time as saved file name. Add axios and S3 library.

Signed-off-by: Zachary Licastro <[email protected]>
…better prepare for future S3 uploads.

Signed-off-by: Zachary Licastro <[email protected]>
…with enum for user type in add_content_source file. Align frontend to also use .env.template and update getting started with some of the new instructions. Remove local setup where it is not needed as we use docker for development.

Signed-off-by: Zachary Licastro <[email protected]>
@CheesyLaZanya CheesyLaZanya added documentation Improvements or additions to documentation enhancement New feature or request frontend dependencies Pull requests that update a dependency file clean-up Work to clean up outdated work labels Dec 28, 2024
…nstructions in getting started for correctness.

Signed-off-by: Zachary Licastro <[email protected]>
Signed-off-by: Zachary Licastro <[email protected]>
@crfearnworks crfearnworks self-requested a review January 5, 2025 20:29
Copy link
Collaborator

@crfearnworks crfearnworks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been able to verify the json generated from my image is compatible with the example, and that the DNG, JPG, and JSON files are in /uploads/pending. After setting up my user as Admin, I have confirmed that the Accept and Reject buttons work and move all files out of Pending into either Accepted or Rejected.

@CheesyLaZanya CheesyLaZanya merged commit f392157 into main Jan 5, 2025
7 checks passed
@CheesyLaZanya CheesyLaZanya deleted the 122-create-hdr-image-moderation-ui branch January 5, 2025 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clean-up Work to clean up outdated work dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request frontend
Projects
None yet
2 participants