Skip to content

Documentation: remove unfortunate abbreviation from readme #1299

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

Merged
merged 3 commits into from
May 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ app.post('/photos/upload', upload.array('photos', 12), function (req, res, next)
// req.body will contain the text fields, if there were any
})

const cpUpload = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', cpUpload, function (req, res, next) {
const uploadMiddleware = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', uploadMiddleware, function (req, res, next) {
// req.files is an object (String -> Array) where fieldname is the key, and the value is array of files
//
// e.g.
Expand Down Expand Up @@ -100,7 +100,7 @@ const multer = require('multer')
const upload = multer({ dest: './public/data/uploads/' })
app.post('/stats', upload.single('uploaded_file'), function (req, res) {
// req.file is the name of your file in the form above, here 'uploaded_file'
// req.body will hold the text fields, if there were any
// req.body will hold the text fields, if there were any
console.log(req.file, req.body)
});
```
Expand Down
24 changes: 12 additions & 12 deletions doc/README-ar.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**ملاحظة**: لن يقوم Multer بمعالجة أي شكل غير متعدد الأجزاء (`multipart/form-data`).


## الترجمات
## الترجمات

هذا الملف متاح أيضًا بلغات أخرى:

Expand Down Expand Up @@ -63,8 +63,8 @@ app.post('/photos/upload', upload.array('photos', 12), function (req, res, next)
// req.body will contain the text fields, if there were any
})

var cpUpload = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', cpUpload, function (req, res, next) {
var uploadMiddleware = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', uploadMiddleware, function (req, res, next) {
// req.files is an object (String -> Array) where fieldname is the key, and the value is array of files
//
// e.g.
Expand Down Expand Up @@ -101,18 +101,18 @@ app.post('/profile', upload.none(), function (req, res, next) {

مفتاح | وصف | ملاحظة
--- | --- | ---
`fieldname` | اسم المُدخَل المحدد في الإستمارة |
`originalname` | اسم الملف على كمبيوتر المستخدم |
`encoding` | نوع تشفير الملف |
`mimetype` | نوع ملف ملحقات بريد إنترنت متعددة الأغراض ( MIME ) |
`size` | حجم الملف بالبايت |
`fieldname` | اسم المُدخَل المحدد في الإستمارة |
`originalname` | اسم الملف على كمبيوتر المستخدم |
`encoding` | نوع تشفير الملف |
`mimetype` | نوع ملف ملحقات بريد إنترنت متعددة الأغراض ( MIME ) |
`size` | حجم الملف بالبايت |
`destination` | المجلد الذي تم حفظ الملف إليه | `تخزين على الاسطوانة` (`DiskStorage`)
`filename` | اسم الملف داخل "الوجهة" ( `destination` ) | `تخزين على الاسطوانة` (`DiskStorage`)
`path` | المسار الكامل للملف الذي تم تحميله | `تخزين على الاسطوانة` (`DiskStorage`)
`buffer` | "ذاكرة" (`Buffer`) للملف بأكمله | `تخزين على الذاكرة ` (`MemoryStorage`)


### `multer(opts)`
### `multer(opts)`

يقبل Multer كائن الخيارات ، وأهمها خاصية `dest`، والتي تحدد مكان تحميل الملفات. في حال حذفت كائن الخيارات ، سيتم الاحتفاظ بالملفات في الذاكرة ولن تتم كتابتها مطلقًا على القرص.

Expand All @@ -122,10 +122,10 @@ app.post('/profile', upload.none(), function (req, res, next) {

مفتاح | وصف
--- | ---
`dest` أو `storage` | مكان لتخزين الملفات
`dest` أو `storage` | مكان لتخزين الملفات
`fileFilter` | دالة للسيطرة على الملفات التي يتم قبولها
`limits` | حدود البيانات التي تم تحميلها
`preservePath` | الاحتفظ بالمسار الكامل للملفات بدلاً من الاسم الأساسي
`limits` | حدود البيانات التي تم تحميلها
`preservePath` | الاحتفظ بالمسار الكامل للملفات بدلاً من الاسم الأساسي

في تطبيق ويب متوسط ​​، قد تكون هناك حاجة فقط إلى `dest`، وتكوينها كما هو موضح في
المثال التالي :
Expand Down
6 changes: 3 additions & 3 deletions doc/README-es.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ app.post('/photos/upload', upload.array('photos', 12), function (req, res, next)
// req.body contendrá los campos de texto, si los hubiera.
})

const cpUpload = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', cpUpload, function (req, res, next) {
const uploadMiddleware = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', uploadMiddleware, function (req, res, next) {
// req.files es un objeto (String -> Array) donde el nombre del campo es la clave (key) y el valor es el arreglo (array) de archivos
//
// Ejemplo
Expand Down Expand Up @@ -84,7 +84,7 @@ Este es un ejemplo de cómo se utiliza multer en un formulario HTML. Presta espe
<div class="form-group">
<input type="file" class="form-control-file" name="uploaded_file">
<input type="text" class="form-control" placeholder="Number of speakers" name="nspeakers">
<input type="submit" value="Get me the stats!" class="btn btn-default">
<input type="submit" value="Get me the stats!" class="btn btn-default">
</div>
</form>
```
Expand Down
10 changes: 5 additions & 5 deletions doc/README-fr.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Multer [![Build Status](https://travis-ci.org/expressjs/multer.svg?branch=master)](https://travis-ci.org/expressjs/multer) [![NPM version](https://badge.fury.io/js/multer.svg)](https://badge.fury.io/js/multer) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

Multer est un middleware node.js pour la gestion des données `multipart/form-data` qui est principalement utilisé pour télécharger des fichiers.
Multer est un middleware node.js pour la gestion des données `multipart/form-data` qui est principalement utilisé pour télécharger des fichiers.
Il est écrit au-dessus de [busboy](https://github.com/mscdex/busboy) pour une efficacité maximale.

**NOTE**: Multer ne traitera aucun formulaire qui ne soit pas un multipart (`multipart/form-data`).
Expand Down Expand Up @@ -55,8 +55,8 @@ app.post('/photos/upload', upload.array('photos', 12), function (req, res, next)
// req.body contiendra les champs de texte, s'il y en avait
})

const cpUpload = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', cpUpload, function (req, res, next) {
const uploadMiddleware = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', uploadMiddleware, function (req, res, next) {
// req.files est un objet (String -> Array) où fieldname est la clé et la valeur est un tableau de fichiers
//
// e.g.
Expand Down Expand Up @@ -87,7 +87,7 @@ Voici un exemple d'utilisation de multer dans un formulaire HTML. Faites particu
<div class="form-group">
<input type="file" class="form-control-file" name="uploaded_file">
<input type="text" class="form-control" placeholder="Number of speakers" name="nspeakers">
<input type="submit" value="Get me the stats!" class="btn btn-default">
<input type="submit" value="Get me the stats!" class="btn btn-default">
</div>
</form>
```
Expand Down Expand Up @@ -232,7 +232,7 @@ doit renvoyer un nom de fichier complet avec une extension de fichier.
Chaque fonction reçoit à la fois la requête (`req`) et des informations sur
le dossier (`file`) pour aider à la décision.

Notez que `req.body` n'a peut-être pas encore été entièrement rempli. Cela dépend de l'ordre
Notez que `req.body` n'a peut-être pas encore été entièrement rempli. Cela dépend de l'ordre
où le client transmet les champs et les fichiers au serveur.

Pour comprendre la convention d'appel utilisée dans le rappel (nécessité de passer
Expand Down
4 changes: 2 additions & 2 deletions doc/README-ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ app.post('/photos/upload', upload.array('photos', 12), function (req, res, next)
// 텍스트 필드가 있는 경우, req.body가 이를 포함할 것입니다.
})

const cpUpload = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', cpUpload, function (req, res, next) {
const uploadMiddleware = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', uploadMiddleware, function (req, res, next) {
// req.files는 (String -> Array) 형태의 객체 입니다.
// 필드명은 객체의 key에, 파일 정보는 배열로 value에 저장됩니다.
//
Expand Down
8 changes: 4 additions & 4 deletions doc/README-pt-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Multer é um middleware node.js para manipulação `multipart/form-data`, que é

**NOTA**: Multer não processará nenhum formulário que não seja multipart (`multipart/form-data`).

## Traduções
## Traduções

Este README também está disponível em outros idiomas:

Expand Down Expand Up @@ -56,8 +56,8 @@ app.post('/photos/upload', upload.array('photos', 12), function (req, res, next)
// req.body conterá os campos de texto, se houver
})

const cpUpload = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', cpUpload, function (req, res, next) {
const uploadMiddleware = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', uploadMiddleware, function (req, res, next) {
// req.files é um objeto (String -> Array) onde fieldname é a chave e o valor é array de arquivos
//
// e.g.
Expand Down Expand Up @@ -251,7 +251,7 @@ A especificação dos limites pode ajudar a proteger seu site contra ataques de

### `fileFilter`

Defina isso para uma função para controlar quais arquivos devem ser enviados e quais devem ser ignorados.
Defina isso para uma função para controlar quais arquivos devem ser enviados e quais devem ser ignorados.

A função deve ficar assim:

Expand Down
20 changes: 10 additions & 10 deletions doc/README-ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Multer — это middleware для фреймворка express для обра

**ВАЖНО**: Multer не обрабатывает никакой другой тип форм, кроме `multipart/form-data`.

## Переводы
## Переводы

Это README также доступно на других языках:

Expand Down Expand Up @@ -52,8 +52,8 @@ app.post('/photos/upload', upload.array('photos', 12), function (req, res, next)
// req.body сохранит текстовые поля, если они будут
})

const cpUpload = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', cpUpload, function (req, res, next) {
const uploadMiddleware = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', uploadMiddleware, function (req, res, next) {
// req.files - объект (String -> Array), где fieldname - ключ, и значение - массив файлов
//
// например:
Expand Down Expand Up @@ -153,7 +153,7 @@ const upload = multer({ dest: 'uploads/' })

#### `DiskStorage`

Движок дискового пространства. Дает полный контроль над размещением файлов на диск.
Движок дискового пространства. Дает полный контроль над размещением файлов на диск.

```javascript
const storage = multer.diskStorage({
Expand All @@ -168,13 +168,13 @@ const storage = multer.diskStorage({
const upload = multer({ storage: storage })
```

Доступно две опции, расположение `destination` и имя файла `filename`. Обе эти функции определяют, где будет находиться файл после загрузки.
Доступно две опции, расположение `destination` и имя файла `filename`. Обе эти функции определяют, где будет находиться файл после загрузки.

`destination` используется, чтобы задать каталог, в котором будут размещены файлы. Может быть задан строкой (например, `'/tmp/uploads'`). Если не задано расположение `destination`, операционная система воспользуется для сохранения каталогом для временных файлов.

**Важно:** Вы должны создать каталог, когда используете `destination`. При передачи в качестве аргумента строки, Multer проверяет, что каталог создан.
**Важно:** Вы должны создать каталог, когда используете `destination`. При передачи в качестве аргумента строки, Multer проверяет, что каталог создан.

`filename` используется, чтобы определить, как будет назван файл внутри каталога. Если
`filename` используется, чтобы определить, как будет назван файл внутри каталога. Если
имя файла `filename` не задано, каждому файлу будет сконфигурировано случайное имя без расширения файла.

**Важно:** Multer не добавляет никакого файлового расширения, ваша функция должна возвращать имя файла с необходимым расширением.
Expand All @@ -191,13 +191,13 @@ const upload = multer({ storage: storage })
const storage = multer.memoryStorage()
const upload = multer({ storage: storage })
```
Когда вы используете этот тип передачи, информация о файле будет содержать поле `buffer`, которое содержит весь файл.
Когда вы используете этот тип передачи, информация о файле будет содержать поле `buffer`, которое содержит весь файл.

**ПРЕДУПРЕЖДЕНИЕ**: Загрузка очень больших файлов, или относительно небольших файлов в большом количестве может вызвать переполнение памяти.

### `limits`

Объект, устанавливающий ограничения. Multer прокидывает этот объект напрямую в busboy, поэтому детали можно посмотреть
Объект, устанавливающий ограничения. Multer прокидывает этот объект напрямую в busboy, поэтому детали можно посмотреть
[на странице с методами busboy](https://github.com/mscdex/busboy#busboy-methods).

Доступны следующие целочисленные значения:
Expand All @@ -216,7 +216,7 @@ const upload = multer({ storage: storage })

### `fileFilter`

Задают функцию для того, чтобы решать, какие файлы будут загружены, а какие — нет. Функция может выглядеть так:
Задают функцию для того, чтобы решать, какие файлы будут загружены, а какие — нет. Функция может выглядеть так:

```javascript
function fileFilter (req, file, cb) {
Expand Down
14 changes: 7 additions & 7 deletions doc/README-uz.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Multer - bu nodejs middleware bo'lib, asosan `multipart/form-data` shaklda yubor

**Muhim**: Multer `multipart` bo'lmagan har qanday formani qayta ishlamaydi.

## Tarjimalar
## Tarjimalar

Bu README boshqa tillarda ham mavjud:

Expand Down Expand Up @@ -55,8 +55,8 @@ app.post('/photos/upload', upload.array('photos', 12), function (req, res, next)
// req.body agar matnli maydonlar (fields) bo'lsa, ularni saqlanadi
})

const cpUpload = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', cpUpload, function (req, res, next) {
const uploadMiddleware = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', uploadMiddleware, function (req, res, next) {
// req.files - bu ob'ekt (String -> Array), matn maydoni(fieldname) - bu key, va qiymat - fayllar massivi
//
// misol:
Expand Down Expand Up @@ -100,7 +100,7 @@ Kalit(key) | Ta'rif | Eslatma

### `multer(opts)`

Multer qo'shimcha ob'ekt qabul qiladi, ulardan eng asosiysi - `dest`,
Multer qo'shimcha ob'ekt qabul qiladi, ulardan eng asosiysi - `dest`,
Multerga fayllarni qayerga yuklash kerakligini aytadigan xususiyat. Agarda siz qo'shimcha(`options`) ob'ektni tashlab ketsangiz, fayllar xotirada saqlanadi va hech qachon diskka yozilmaydi.

Standart holatda - Multer nomlashda kelib chiqishi mumkin bo'lgan muammolarni oldini olish uchun fayllar nomini o'zgartiradi. O'z talablaringizga mos ravishda nomlash funksiyasini sozlay olashingiz mumkin.
Expand Down Expand Up @@ -156,7 +156,7 @@ Ushbu so'rov barcha fayllarni qabul qiladi, fayllar `req.files` ichida saqlanadi

#### `DiskStorage`

Diskka saqlash motori(engine) sizga fayllarni saqlashda to'liq nazorat qilish imkonini beradi.
Diskka saqlash motori(engine) sizga fayllarni saqlashda to'liq nazorat qilish imkonini beradi.

```javascript
const storage = multer.diskStorage({
Expand Down Expand Up @@ -202,7 +202,7 @@ Xotirada saqlash paytida, fayl ma'lumotlari `buffer` deb nomlanadigan maydonni o

### `limits`

Quyidagi xususiyatlar o'lchov(limit)larni aniqlaydigan obyekt. Multer ushbu obyektni to'g'ridan-to'g'ri busboy ga o'tkazadi va xususiyatlar tafsilotlari [busboy sahifasida](https://github.com/mscdex/busboy#busboy-methods)dan topishingiz mumkin.
Quyidagi xususiyatlar o'lchov(limit)larni aniqlaydigan obyekt. Multer ushbu obyektni to'g'ridan-to'g'ri busboy ga o'tkazadi va xususiyatlar tafsilotlari [busboy sahifasida](https://github.com/mscdex/busboy#busboy-methods)dan topishingiz mumkin.

Quyidagi butun qiymatlar mavjud:

Expand All @@ -225,7 +225,7 @@ Bu, qaysi fayllarni yuklashi, qaysilarini o'tkazib yuborish kerakligini boshqari
```javascript
function fileFilter (req, file, cb) {

// Bu funksiya, faylni qabul qilish kerakligini anglatish uchun `cb` ni
// Bu funksiya, faylni qabul qilish kerakligini anglatish uchun `cb` ni
// boolean qiymat bilan chaqirish kerak.

// Faylni qabul qilishni rad etish uchun false quyudagicha berilishi kerak:
Expand Down
4 changes: 2 additions & 2 deletions doc/README-vi.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ app.post('/photos/upload', upload.array('photos', 12), function(
// req.body sẽ giữ thông tin gắn kèm (vd: text fields), nếu có
});

var cpUpload = upload.fields([
var uploadMiddleware = upload.fields([
{ name: 'avatar', maxCount: 1 },
{ name: 'gallery', maxCount: 8 },
]);
app.post('/cool-profile', cpUpload, function(req, res, next) {
app.post('/cool-profile', uploadMiddleware, function(req, res, next) {
// req.files là một object kiểu (String -> Array) mà fieldname là key, và value là mảng các files
//
// vd:
Expand Down
4 changes: 2 additions & 2 deletions doc/README-zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ app.post('/photos/upload', upload.array('photos', 12), function (req, res, next)
// req.body 将具有文本域数据,如果存在的话
})

const cpUpload = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', cpUpload, function (req, res, next) {
const uploadMiddleware = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', uploadMiddleware, function (req, res, next) {
// req.files 是一个对象 (String -> Array) 键是文件名,值是文件数组
//
// 例如:
Expand Down
Loading