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

Feature Request: Media committed with Post / Collection Item #1344

Closed
ro-savage opened this issue May 8, 2018 · 10 comments · Fixed by #2851
Closed

Feature Request: Media committed with Post / Collection Item #1344

ro-savage opened this issue May 8, 2018 · 10 comments · Fixed by #2851

Comments

@ro-savage
Copy link

When running in publish_mode: editorial_workflow the current setup is to create a PR for the post / collection item but upload media directly to master ( or the branch specified in backend)

This means that images are automatically committed, while the collection item needs approval.

We would like to see, by default, when an image is uploaded to the media gallery it goes to the same PR as the collection item to be posted.

This way both the collection item and any related media are contained in a single PR and can be reviewed and approved.

@haileypate
Copy link

haileypate commented May 9, 2018

Completely agree! I had not noticed this yet, but I'm days away from a use case where it would have come up.

I've just started to learn more about selenium and automated testing... and I could see this affecting my ability to automate a test that checks to see if an uploaded image is sized correctly and doesn't break a layout

@ro-savage
Copy link
Author

I created a very naive implementation for github.

Not useful to merge in here but might be useful for anyone who needs a quick implementation

Encrypt-S@a86b5e8

https://www.npmjs.com/package/@encrypt-s/netlify-cms

@rdebeasi
Copy link
Contributor

Awesome - thanks for submitting this!

In our use case, we'd like to open editing to the general public and have configured our site so that only admins can merge to master. Currently, users logged into Netlify CMS can edit content but cannot upload images because they are not allowed to commit directly to master.

@tech4him1
Copy link
Contributor

Currently, users logged into Netlify CMS can edit content but cannot upload images because they are not allowed to commit directly to master.

@rdebeasi That's a very good point, we'll definitely need to consider.

cc/ @Benaiah

@erquhart
Copy link
Contributor

Not sure how that's possible, aren't write permissions required for successful login?

@tech4him1
Copy link
Contributor

Currently, users logged into Netlify CMS can edit content but cannot upload images because they are not allowed to commit directly to master.

@erquhart This is not related to logging in. It is in the case of a protected master branch, where reviews are required.

@erquhart
Copy link
Contributor

Ah, protected branch, so the user does have write permissions, nevermind.

The closest solution is to use an external media library, a feature I expect to be merged in the near future. The first integration is Uploadcare and they have a great free tier.

@tech4him1
Copy link
Contributor

@erquhart I think this is still worth discussing -- would you mind giving the reasons you decided to commit to master instead of the PR when you first worked on the media library?

@ro-savage
Copy link
Author

ro-savage commented Aug 27, 2018 via email

@erquhart
Copy link
Contributor

The reason media commits to master is because we wanted assets to be reusable between entries rather than being tied to them. If you had an oft used image you had to have access to it somewhere physically so you could upload it again every time you needed it in an entry. What we now see is that there's a need for both approaches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants