Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-08-15 21:06:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-08-15 21:06:58 +0300
commit0905e6bd5042fa84fe66736eb9ab1be94c3d8aa9 (patch)
tree74deb17608bd1a8c0f9e86ceae0d3e079e123323 /doc/administration/snippets
parent12a224d5db7aebdb30cda8ffb75c69fc66d07096 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/administration/snippets')
-rw-r--r--doc/administration/snippets/index.md48
1 files changed, 16 insertions, 32 deletions
diff --git a/doc/administration/snippets/index.md b/doc/administration/snippets/index.md
index 6f165a8b0b0..b59432b0b9e 100644
--- a/doc/administration/snippets/index.md
+++ b/doc/administration/snippets/index.md
@@ -5,45 +5,28 @@ group: Source Code
info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments"
---
-# Snippets settings **(FREE SELF)**
+# Snippets **(FREE SELF)**
-Adjust the snippets' settings of your GitLab instance.
-
-## Snippets content size limit
-
-You can set a maximum content size limit for snippets. This limit can prevent
-abuse of the feature. The default value is **52428800 Bytes** (50 MB).
-
-### How does it work?
-
-The content size limit is applied when a snippet is created or updated.
-
-This limit doesn't affect existing snippets until they're updated and their
+You can configure a maximum size for a snippet to prevent abuse.
+The default limit is 52428800 bytes (50 MB).
+The limit is applied when a snippet is created or updated.
+The limit does not affect existing snippets unless they are updated and their
content changes.
-### Snippets size limit configuration
+## Configure the snippet size limit
-This setting is not available through the [Admin Area settings](../settings/index.md).
-To configure this setting, use either the Rails console
+To configure the snippet size limit, you can use the Rails console
or the [Application settings API](../../api/settings.md).
-NOTE:
-The value of the limit **must** be in bytes.
-
-#### Through the Rails console
+The limit **must** be in bytes.
-The steps to configure this setting through the Rails console are:
+This setting is not available in the [Admin Area settings](../settings/index.md).
-1. Start the Rails console:
+### Use the Rails console
- ```shell
- # For Linux package (Omnibus) installations
- sudo gitlab-rails console
-
- # For installations from source
- sudo -u git -H bundle exec rails console -e production
- ```
+To configure this setting through the Rails console:
+1. [Start the Rails console](../operations/rails_console.md#starting-a-rails-console-session).
1. Update the snippets maximum file size:
```ruby
@@ -56,10 +39,11 @@ To retrieve the current value, start the Rails console and run:
Gitlab::CurrentSettings.snippet_size_limit
```
-#### Through the API
+### Use the API
-To set the snippets size limit through the Application Settings API (similar to
-[updating any other setting](../../api/settings.md#change-application-settings)), use this command:
+To set the limit by using the Application Settings API
+(similar to [updating any other setting](../../api/settings.md#change-application-settings)),
+use this command:
```shell
curl --request PUT \