Commit graph

21 commits

Author SHA1 Message Date
Ben Halpern
c71b2b182f
Change profile image max size to 8 MB (#20183)
* Change profile image max size to 8 MB

* Stub the const for the sake of the test
2023-09-28 17:05:35 -04:00
Jerin K C
6b996cfc61
Image auto orient (#20018) 2023-09-07 15:38:34 -04:00
yheuhtozr
d794e70cbc
small non-views ruby i18n (#16004) 2022-01-11 10:05:18 +07:00
Ridhwana
81571bb0b5
Data Update Script to migrate logo_svg contents to png file (Will be merged and deployed on 10/01) (#15710)
* feat/WIP: first version of the svg logo to png logo DUS

* feat: logoSVG Uploader

* refactor: remove the if original_filename

* feat: add a test for the logo_svg_uploader

* feat: update the test and dus

* add soem error handling

* updae the rails spec helper

* feat: provide a content type

* feat: add content type

* Try https://travis-ci.community/t/build-times-out-with-no-apparent-reason/5083/4

* chore: try this suggestion https://stackoverflow.com/questions/41138404/how-to-install-newer-imagemagick-with-webp-support-in-travis-ci-container

* chore: remove libweb adn fix = in the travis.yml

* chore: undo the changes to attempt to update the version for image magick

* feat: install gsfonts for convert

* chore: add a comment for svg

* feat: use the good practices for tempfile, update error handling and update the tests

* chore: update the timestamp on the DUS

* feat: convert to png with a transparent background using Image Magick

* feat: substitute some css variables with real css colors

* chore: revert the path

* fix: set content type

* Update lib/data_update_scripts/20220105112823_migrate_logo_svg_data.rb

Co-authored-by: Jamie Gaskins <jamie@forem.com>

Co-authored-by: Jamie Gaskins <jamie@forem.com>
2022-01-10 16:09:34 +02:00
Nick Taylor
6df9309284
Added the logo upload to the admin -> customization -> config -> images section. (#15729)
Co-authored-by: Michael Kohl <citizen428@forem.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Mac Siri <mac@forem.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2021-12-15 14:10:27 -05:00
Nick Taylor
6d79fc94a9
Creator Settings: Removed SVG files as an option for logo upload (#15662) 2021-12-03 10:47:42 -05:00
Nick Taylor
3f2569b938
Forem Creation: Logo Upload & Resizing (#15499)
* wip - Got logo upload working

* Now have the logo rendering in the header and in the admin image config section.

* Small layout tweak for admin -> config -> images -> logo.

* feat: create a logo uploader with some tests

* feat: use the logoUploader instead of the ArticleImageUploader

* feat: return early because svg's do not contain exif or gps data

* chore: we can move the raise outside the transaction as the rest of the transaction won't execute if we raise an error

* feat: add a size range

* WIP: resize an image to a random number for now

* hid the logo behind a feature flag and kept logo_svg as is in the site header.

* Added the jpe file type to the logo uploader.

* Skipped the resizing of an image if it's an SVG in the logo uploader.

* Added content types to the content type logo uploader allow list.

* Synced logo validation with frontend and backend.

* Removed unnecessary ALLOWED_PARAMS elements.

* feat: update the logo upoader and tests

* chore: remove comments

* chore: remove comments

* feat: update the resizing for the images + add the correct content type

* spec: test the versions

* fix: update the Constant

* feat: add the versions of the logo

* feat: populate the settings correctly and consistently

* feat: add an random string to the file name to avoid caching issues

* feat: amend the logo layout

* chore: remove comments

* spec: update

* feat: image type whitelist

* feat: update the logo css and  also just use resized_logo and remove mobile resize

* feat: add a max-height

* only add site-logo if the feature flag is off

* Renamed IMAGE_TYPE_WHITELIST to IMAGE_TYPE_ALLOWLIST

* Update app/controllers/admin/creator_settings_controller.rb

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Update app/uploaders/logo_uploader.rb

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Update app/uploaders/logo_uploader.rb

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Update app/uploaders/logo_uploader.rb

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Update spec/uploaders/logo_uploader_spec.rb

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* Update spec/uploaders/logo_uploader_spec.rb

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* chore: revert admin change

* refactor: use a static value for directory

* feat: freeze constants

* feat: remove the logo requirement

* chore: spacing

* remove logo requirement

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
Co-authored-by: Michael Kohl <citizen428@forem.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2021-12-02 09:49:09 +02:00
Michael Kohl
a1f512e49e
✂✂✂ Remove events (#15062)
* Remove events

* Fix schema

* Fix specs

* More removal
2021-10-15 09:31:08 -04:00
dependabot[bot]
f0093c5338
Bump rubocop from 1.18.4 to 1.19.0 (#14489)
* Bump rubocop from 1.18.4 to 1.19.0

Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.18.4 to 1.19.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.18.4...v1.19.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Rubocop autofixes

* Manually fix some Rubocop warnings/errors

* How about another coffee, Michael?

* Maybe Rubocop needs a coffee too

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Kohl <citizen428@forem.com>
2021-08-13 13:14:59 +07:00
Michael Kohl
57545cc607
Change frame limit to match imgproxy (#13265) 2021-04-06 12:28:50 +02:00
dependabot[bot]
fcce38fb7a
Bump carrierwave from 2.1.1 to 2.2.0 (#12802)
* Bump carrierwave from 2.1.1 to 2.2.0

Bumps [carrierwave](https://github.com/carrierwaveuploader/carrierwave) from 2.1.1 to 2.2.0.
- [Release notes](https://github.com/carrierwaveuploader/carrierwave/releases)
- [Changelog](https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md)
- [Commits](https://github.com/carrierwaveuploader/carrierwave/compare/v2.1.1...v2.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Replace extension_whitelist with extension_allowlist

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: rhymes <rhymes@hey.com>
2021-02-25 10:53:25 +01:00
Molly Struve
4ffd9ca7a5
Refactor:Change Image Article Upload Path to uploads/articles (#12668)
* Refactor:Change Image Article Upload Path to uploads/articles/

* fix request spec
2021-02-15 11:52:00 -06:00
Molly Struve
66c70d38e8
[deploy] Bug Fix: Validate GIFs Frames and Add MiniMagick Timeout (#9319) 2020-07-15 09:49:24 -05:00
Molly Struve
aa7b76d9a2
Limit ALL Upload file sizes to 25 MB (#5356) [deploy] 2020-01-07 11:20:40 -05:00
rhymes
8989a52aba Strip EXIF and GPS data from uploaded images (#4450)
* Add specs for ArticleImageUploader

* Add specs for BadgeUploader

* Add specs for CoverImageUploader

* Add specs for ProfileImageUploader

* Refactor uploaders to inherit from BaseUploader

* Strip EXIF and GPS data from uploaded images

* Add ImageMagick to the docs

* Protect strip_exif
2019-10-24 16:35:10 -04:00
Bolarinwa Balogun
86b0777938 Set max file size limit for profile images (#3313) 2019-06-28 12:06:25 -04:00
Keshav Biswa
8d57d45ecc Rubocop Style cops enabled (#2056)
* Rubocop enabled style/alias

* Enabled Style/ArrayJoin Cop

* Enabled Style/Attr

* Enabled Case Equality

* Enabled CharacterLiteral

*  Enabled ColonMethodCall Cop

* Enabled CommentAnnotation cop

* Enabled PreferredHashMethods Cop

*  Enabled DoubleNegation Cop

* Enabled EachWithObject Cop

* Enabled EmptyLiteral Cop

* Enabled EvenOdd Cop

* Enabled IfWithSemicolon Cop

* Enabled Lambda and LambdaCall Cop

* Enabled LineEndConcatenation Cop

* Enabled ModuleFunction Cop;

* Enable NegatedIf and NegatedWhile Cop

* Enabled NilComparison Cop

* Enabled Not Cop

* Enabled NumericLiterals Cop

* Enabled OneLineConditional Cop

* Enabled PercentLiteralDelimiters Cop

* Excluded internal/users_controller from negated_if cop

* Reverted the double negation change from github_issue_tag and github_issue.rb"

* Enabled PerlBackrefs Cop

* Changed Regexp.last_match(1) to Regexp.last_match(0)

* Enabled proc cop

* Enabled RaiseArgs Cop

* Reverted Regexp.last_match(0) to Regexp.last_match(1)

* Enabled SelfAssignment Cop

* Enabled SingleLineMethods Cop

* Enabled SpecialGlobalVars Cop

* Enabled VariableInterpolation Cop

* Enabled WhenThen Cop

* Enabled WhileUntilModifier Cop

* Enabled WordArray Cop

* Enabled IfUnlessModifier Cop

* Enabled GuardClause Cop
2019-03-15 18:33:54 -04:00
rhymes
e588fa7ece Code cleanups (#659)
* Initial automatic cleanup with rubocop

* Fix syntax error introduced by rubocop

* Cleanup seeds file

* Cleanup lib folder

* Exclude bin folder because it contains auto generated files

* Make Rubocop a little bit more chatty

* Block length should not include comments in the count

* Cleanup config folder

* Cleanup specs

* Updated Rubocop version and generated a todo file

* Fix broken ArticlesApi spec

* Fix tests

* Restored rubocop pre-commit hook
2018-08-07 11:00:13 -04:00
Andy Zhao
cfd95a65af Update "Connect Twitter acct" in settings with new callback url (#439)
* Update "Connect Twitter acct" in settings with new callback url

* Remove name from comments (#437)
2018-06-15 12:52:14 -04:00
Mac Siri
1663e7e2c8 Implement Badge & BadgeAchievement model (#273)
* Create migration for Badge & BadgeAchievement

* Create Badge model with spec & BadgeUploader

* Create BadgeAchievement with spec

* Add badges & badge_achievements assoc to User

* Fix typo

* Clean up BadgeUploader

* Remove storage config & Fix lint

* Add allow-duplicate-badge spec
2018-05-07 13:35:16 -04:00
Mac Siri
301c6080e3 Initial commit 2018-02-28 16:11:08 -05:00