]> cat aescling's git repositories - mastodon.git/commit
Improvements to image upload validation and creation (#10431)
authorslice <ryaneft@gmail.com>
Mon, 1 Apr 2019 05:30:46 +0000 (22:30 -0700)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 1 Apr 2019 05:30:46 +0000 (07:30 +0200)
commit85973f4f37c8b94422f267654018d0d7f88ba32b
tree76aa1adb9f7543f68af7f1dbeb735386e5c03a97
parentabdf225353dfb9791933b5d2dbcd038dcdb656df
Improvements to image upload validation and creation (#10431)

* Check if image value is nil? before creating an image

Check if uploaded images aren't nil before creating SiteUpload models
for them.

* Validate presence of file in SiteUpload

* Fix file presence validation

* Fabricate SiteUpload#file

* Add link to Creative Commons license
app/models/form/admin_settings.rb
app/models/site_upload.rb
spec/fabricators/assets/TEAPOT [new file with mode: 0644]
spec/fabricators/assets/utah_teapot.png [new file with mode: 0644]
spec/fabricators/site_upload_fabricator.rb