mirror of
https://github.com/strapi/strapi.git
synced 2025-10-14 01:24:10 +00:00
Merge branch 'master' into patch-1
This commit is contained in:
commit
daf2dd4ac2
@ -52,10 +52,10 @@ As an **example** let's consider the following models:
|
|||||||
|
|
||||||
### `Image With Description` Component
|
### `Image With Description` Component
|
||||||
|
|
||||||
| Fields | Type | Description |
|
| Fields | Type | Description |
|
||||||
| :---------- | :----- | :------------------- |
|
| :---------- | :----- | :-------------------- |
|
||||||
| image | media | The image file |
|
| image | media | The image file |
|
||||||
| title | string | the image title |
|
| title | string | the image title |
|
||||||
| description | text | the image description |
|
| description | text | the image description |
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
@ -491,20 +491,22 @@ sudo nano ecosystem.config.js
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
module.exports = {
|
module.exports = {
|
||||||
apps : [{
|
apps: [
|
||||||
name: 'your-app-name',
|
{
|
||||||
cwd: '/home/ubuntu/my-strapi-project/my-project',
|
name: 'your-app-name',
|
||||||
script: 'npm',
|
cwd: '/home/ubuntu/my-strapi-project/my-project',
|
||||||
args: 'start',
|
script: 'npm',
|
||||||
env: {
|
args: 'start',
|
||||||
NODE_ENV: 'production',
|
env: {
|
||||||
DATABASE_HOST: 'your-unique-url.rds.amazonaws.com', // database Endpoint under 'Connectivity & Security' tab
|
NODE_ENV: 'production',
|
||||||
DATABASE_PORT: '5432',
|
DATABASE_HOST: 'your-unique-url.rds.amazonaws.com', // database Endpoint under 'Connectivity & Security' tab
|
||||||
DATABASE_NAME: 'strapi', // DB name under 'Configuration' tab
|
DATABASE_PORT: '5432',
|
||||||
DATABASE_USERNAME: 'postgres', // default username
|
DATABASE_NAME: 'strapi', // DB name under 'Configuration' tab
|
||||||
DATABASE_PASSWORD: 'Password',
|
DATABASE_USERNAME: 'postgres', // default username
|
||||||
|
DATABASE_PASSWORD: 'Password',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}],
|
],
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -496,7 +496,7 @@ RENAME TABLE groups_old_table_name TO components_new_table_name;
|
|||||||
**2. Change the `collectionName` of the component**
|
**2. Change the `collectionName` of the component**
|
||||||
|
|
||||||
**Before**
|
**Before**
|
||||||
`./api/components/category/component.json`
|
`./components/component.json`
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -506,7 +506,7 @@ RENAME TABLE groups_old_table_name TO components_new_table_name;
|
|||||||
```
|
```
|
||||||
|
|
||||||
**After**
|
**After**
|
||||||
`./api/components/category/component.json`
|
`./components/component.json`
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -533,7 +533,6 @@ SET related_type = 'components_new_table_name'
|
|||||||
WHERE related_type = 'groups_old_table_name';
|
WHERE related_type = 'groups_old_table_name';
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
#### Mongo
|
#### Mongo
|
||||||
|
|
||||||
In `mongo` the relation between a content type and its components is held in an array of references. To know which component type it referes to, the array also contains a `kind` attribute containing the component Schema name.
|
In `mongo` the relation between a content type and its components is held in an array of references. To know which component type it referes to, the array also contains a `kind` attribute containing the component Schema name.
|
||||||
@ -566,7 +565,7 @@ db.collection.renameCollection('groups_my_group', 'components_my_component');
|
|||||||
**3. Change the `collectionName` of the component**
|
**3. Change the `collectionName` of the component**
|
||||||
|
|
||||||
**Before**
|
**Before**
|
||||||
`./api/components/category/component.json`
|
`./components/component.json`
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -576,7 +575,7 @@ db.collection.renameCollection('groups_my_group', 'components_my_component');
|
|||||||
```
|
```
|
||||||
|
|
||||||
**After**
|
**After**
|
||||||
`./api/components/category/component.json`
|
`./components/component.json`
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
|
|||||||
const Wrapper = styled.div`
|
const Wrapper = styled.div`
|
||||||
padding-top: 0.7rem;
|
padding-top: 0.7rem;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 60px;
|
top: 6rem;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -270,11 +270,16 @@ module.exports = {
|
|||||||
: null
|
: null
|
||||||
);
|
);
|
||||||
|
|
||||||
const reverseAssoc = model.associations.find(assoc => assoc.alias === obj.field);
|
const reverseAssoc = model.associations.find(
|
||||||
|
assoc => assoc.alias === obj.field
|
||||||
|
);
|
||||||
|
|
||||||
// Remove existing relationship because only one file
|
// Remove existing relationship because only one file
|
||||||
// can be related to this field.
|
// can be related to this field.
|
||||||
if (reverseAssoc && reverseAssoc.nature === 'oneToManyMorph') {
|
if (
|
||||||
|
reverseAssoc &&
|
||||||
|
reverseAssoc.nature === 'oneToManyMorph'
|
||||||
|
) {
|
||||||
relationUpdates.push(
|
relationUpdates.push(
|
||||||
module.exports.removeRelationMorph
|
module.exports.removeRelationMorph
|
||||||
.call(
|
.call(
|
||||||
|
@ -14,7 +14,7 @@ const DragWrapper = styled.div`
|
|||||||
}
|
}
|
||||||
> div > div {
|
> div > div {
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
overflow-y: hidden;
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
@ -26,5 +26,7 @@
|
|||||||
"notification.dropFile.success": "تم تحميل ملفك",
|
"notification.dropFile.success": "تم تحميل ملفك",
|
||||||
"notification.dropFiles.success": "{number} ملفات تم تحميلها",
|
"notification.dropFiles.success": "{number} ملفات تم تحميلها",
|
||||||
"Upload.status.sizeLimit": "{file} أكبر من حجم الحد الذي تمت تهيئته",
|
"Upload.status.sizeLimit": "{file} أكبر من حجم الحد الذي تمت تهيئته",
|
||||||
"Upload.status.disabled" : "تم تعطيل تحميل الملف"
|
"Upload.status.disabled" : "تم تعطيل تحميل الملف",
|
||||||
|
"plugin.description.long": "إدارة ملفات الوسائط المتعددة.",
|
||||||
|
"plugin.description.short": "إدارة ملفات الوسائط المتعددة."
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,7 @@
|
|||||||
"notification.dropFile.success": "Deine Datei wurde hochgeladen",
|
"notification.dropFile.success": "Deine Datei wurde hochgeladen",
|
||||||
"notification.dropFiles.success": "{number} Dateien wurden hochgeladen",
|
"notification.dropFiles.success": "{number} Dateien wurden hochgeladen",
|
||||||
"Upload.status.sizeLimit": "{file} ist größer als die konfigurierte Begrenzungsgröße",
|
"Upload.status.sizeLimit": "{file} ist größer als die konfigurierte Begrenzungsgröße",
|
||||||
"Upload.status.disabled" : "Das Hochladen von Dateien ist deaktiviert"
|
"Upload.status.disabled" : "Das Hochladen von Dateien ist deaktiviert",
|
||||||
|
"plugin.description.long": "Multimedia-Dateiverwaltung.",
|
||||||
|
"plugin.description.short": "Multimedia-Dateiverwaltung."
|
||||||
}
|
}
|
||||||
|
@ -27,5 +27,7 @@
|
|||||||
"notification.config.success": "The settings has been updated",
|
"notification.config.success": "The settings has been updated",
|
||||||
"notification.delete.success": "The file has been deleted",
|
"notification.delete.success": "The file has been deleted",
|
||||||
"notification.dropFile.success": "Your file has been uploaded",
|
"notification.dropFile.success": "Your file has been uploaded",
|
||||||
"notification.dropFiles.success": "{number} files have been uploaded"
|
"notification.dropFiles.success": "{number} files have been uploaded",
|
||||||
|
"plugin.description.long": "Media file management.",
|
||||||
|
"plugin.description.short": "Media file management."
|
||||||
}
|
}
|
||||||
|
@ -27,5 +27,7 @@
|
|||||||
"notification.dropFiles.success": "{number} archivos han sido cargados",
|
"notification.dropFiles.success": "{number} archivos han sido cargados",
|
||||||
"Upload.status.sizeLimit": "{file} es más grande que el tamaño límite configurado",
|
"Upload.status.sizeLimit": "{file} es más grande que el tamaño límite configurado",
|
||||||
"Upload.status.disabled" : "La carga de archivos está deshabilitada",
|
"Upload.status.disabled" : "La carga de archivos está deshabilitada",
|
||||||
"Upload.status.empty": "Los archivos están vacíos"
|
"Upload.status.empty": "Los archivos están vacíos",
|
||||||
|
"plugin.description.long": "Gestión de archivos multimedia.",
|
||||||
|
"plugin.description.short": "Gestión de archivos multimedia."
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,7 @@
|
|||||||
"notification.dropFile.success": "Votre fichier a été téléchargé",
|
"notification.dropFile.success": "Votre fichier a été téléchargé",
|
||||||
"notification.dropFiles.success": "{number} fichiers ont été téléchargées",
|
"notification.dropFiles.success": "{number} fichiers ont été téléchargées",
|
||||||
"Upload.status.sizeLimit": "{file} est plus grand que la taille limite configurée",
|
"Upload.status.sizeLimit": "{file} est plus grand que la taille limite configurée",
|
||||||
"Upload.status.disabled" : "Le téléchargement de fichier est désactivé"
|
"Upload.status.disabled" : "Le téléchargement de fichier est désactivé",
|
||||||
|
"plugin.description.long": "Gestion de fichiers multimédia.",
|
||||||
|
"plugin.description.short": "Gestion de fichiers multimédia."
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,7 @@
|
|||||||
"notification.dropFile.success": "Il file è stato caricato",
|
"notification.dropFile.success": "Il file è stato caricato",
|
||||||
"notification.dropFiles.success": "{number} file sono stati caricati",
|
"notification.dropFiles.success": "{number} file sono stati caricati",
|
||||||
"Upload.status.sizeLimit": "{file} è più grande della dimensione limite configurata",
|
"Upload.status.sizeLimit": "{file} è più grande della dimensione limite configurata",
|
||||||
"Upload.status.disabled" : "Il caricamento del file è disabilitato"
|
"Upload.status.disabled" : "Il caricamento del file è disabilitato",
|
||||||
|
"plugin.description.long": "Gestione dei file multimediali.",
|
||||||
|
"plugin.description.short": "Gestione dei file multimediali."
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,7 @@
|
|||||||
"notification.dropFile.success": "ファイルがアップロードされました",
|
"notification.dropFile.success": "ファイルがアップロードされました",
|
||||||
"notification.dropFiles.success": "{number}個のファイルがアップロードされました",
|
"notification.dropFiles.success": "{number}個のファイルがアップロードされました",
|
||||||
"Upload.status.sizeLimit": "{file}は設定された制限サイズよりも大きいです",
|
"Upload.status.sizeLimit": "{file}は設定された制限サイズよりも大きいです",
|
||||||
"Upload.status.disabled" : "ファイルのアップロードが無効になっています"
|
"Upload.status.disabled" : "ファイルのアップロードが無効になっています",
|
||||||
|
"plugin.description.long": "マルチメディアファイル管理.",
|
||||||
|
"plugin.description.short": "マルチメディアファイル管理."
|
||||||
}
|
}
|
||||||
|
@ -27,5 +27,7 @@
|
|||||||
"notification.config.success": "설정을 업데이트했습니다.",
|
"notification.config.success": "설정을 업데이트했습니다.",
|
||||||
"notification.delete.success": "파일을 삭제했습니다.",
|
"notification.delete.success": "파일을 삭제했습니다.",
|
||||||
"notification.dropFile.success": "파일을 업로드했습니다.",
|
"notification.dropFile.success": "파일을 업로드했습니다.",
|
||||||
"notification.dropFiles.success": "{number}개의 파일을 업로드 했습니다."
|
"notification.dropFiles.success": "{number}개의 파일을 업로드 했습니다.",
|
||||||
|
"plugin.description.long": "멀티미디어 파일 관리.",
|
||||||
|
"plugin.description.short": "멀티미디어 파일 관리."
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,7 @@
|
|||||||
"notification.dropFile.success": "Je bestand is geüpload",
|
"notification.dropFile.success": "Je bestand is geüpload",
|
||||||
"notification.dropFiles.success": "{number} bestanden zijn geüpload",
|
"notification.dropFiles.success": "{number} bestanden zijn geüpload",
|
||||||
"Upload.status.sizeLimit": "{file} is groter dan de geconfigureerde limietgrootte",
|
"Upload.status.sizeLimit": "{file} is groter dan de geconfigureerde limietgrootte",
|
||||||
"Upload.status.disabled" : "Bestand uploaden is uitgeschakeld"
|
"Upload.status.disabled" : "Bestand uploaden is uitgeschakeld",
|
||||||
|
"plugin.description.long": "Multimediabestandsbeheer.",
|
||||||
|
"plugin.description.short": "Multimediabestandsbeheer."
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,7 @@
|
|||||||
"notification.dropFile.success": "Plik został przesłany",
|
"notification.dropFile.success": "Plik został przesłany",
|
||||||
"notification.dropFiles.success": "{number} plików zostało przesłanych",
|
"notification.dropFiles.success": "{number} plików zostało przesłanych",
|
||||||
"Upload.status.sizeLimit": "{plik} jest większy niż skonfigurowany rozmiar limitu",
|
"Upload.status.sizeLimit": "{plik} jest większy niż skonfigurowany rozmiar limitu",
|
||||||
"Upload.status.disabled" : "Przesyłanie plików jest wyłączone"
|
"Upload.status.disabled" : "Przesyłanie plików jest wyłączone",
|
||||||
|
"plugin.description.long": "Zarządzanie plikami multimedialnymi.",
|
||||||
|
"plugin.description.short": "Zarządzanie plikami multimedialnymi."
|
||||||
}
|
}
|
||||||
|
@ -24,5 +24,7 @@
|
|||||||
"notification.config.success": "As configurações foram atualizadas",
|
"notification.config.success": "As configurações foram atualizadas",
|
||||||
"notification.delete.success": "O arquivo foi removido",
|
"notification.delete.success": "O arquivo foi removido",
|
||||||
"notification.dropFile.success": "Seu arquivo foi enviado com sucesso",
|
"notification.dropFile.success": "Seu arquivo foi enviado com sucesso",
|
||||||
"notification.dropFiles.success": "{number} arquivos foram enviados com sucesso"
|
"notification.dropFiles.success": "{number} arquivos foram enviados com sucesso",
|
||||||
|
"plugin.description.long": "Gerenciamento de arquivos multimídia.",
|
||||||
|
"plugin.description.short": "Gerenciamento de arquivos multimídia."
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,7 @@
|
|||||||
"notification.dropFile.success": "Seu arquivo foi transferido com sucesso",
|
"notification.dropFile.success": "Seu arquivo foi transferido com sucesso",
|
||||||
"notification.dropFiles.success": "{number} arquivos foram transferidos com sucesso",
|
"notification.dropFiles.success": "{number} arquivos foram transferidos com sucesso",
|
||||||
"Upload.status.sizeLimit": "{file} é maior que o tamanho limite configurado",
|
"Upload.status.sizeLimit": "{file} é maior que o tamanho limite configurado",
|
||||||
"Upload.status.disabled" : "O upload de arquivos está desativado"
|
"Upload.status.disabled" : "O upload de arquivos está desativado",
|
||||||
|
"plugin.description.long": "Gerenciamento de arquivos multimídia.",
|
||||||
|
"plugin.description.short": "Gerenciamento de arquivos multimídia."
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,7 @@
|
|||||||
"notification.dropFile.success": "Ваш файл загружен",
|
"notification.dropFile.success": "Ваш файл загружен",
|
||||||
"notification.dropFiles.success": "Файлов загружено: {number}",
|
"notification.dropFiles.success": "Файлов загружено: {number}",
|
||||||
"Upload.status.sizeLimit": "{file} больше настроенного предельного размера",
|
"Upload.status.sizeLimit": "{file} больше настроенного предельного размера",
|
||||||
"Upload.status.disabled" : "Загрузка файла отключена"
|
"Upload.status.disabled" : "Загрузка файла отключена",
|
||||||
|
"plugin.description.long": "Управление мультимедийными файлами.",
|
||||||
|
"plugin.description.short": "Управление мультимедийными файлами."
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,7 @@
|
|||||||
"notification.dropFile.success": "Dosyanız yüklendi",
|
"notification.dropFile.success": "Dosyanız yüklendi",
|
||||||
"notification.dropFiles.success": "{number} dosyalar yüklendi",
|
"notification.dropFiles.success": "{number} dosyalar yüklendi",
|
||||||
"Upload.status.sizeLimit": "{file} yapılandırılmış sınır boyutundan daha büyük",
|
"Upload.status.sizeLimit": "{file} yapılandırılmış sınır boyutundan daha büyük",
|
||||||
"Upload.status.disabled" : "Dosya yükleme devre dışı"
|
"Upload.status.disabled" : "Dosya yükleme devre dışı",
|
||||||
|
"plugin.description.long": "Multimedya Dosya Yönetimi.",
|
||||||
|
"plugin.description.short": "Multimedya Dosya Yönetimi."
|
||||||
}
|
}
|
||||||
|
@ -27,5 +27,7 @@
|
|||||||
"notification.config.success": "Các cấu hình đã được cập nhật",
|
"notification.config.success": "Các cấu hình đã được cập nhật",
|
||||||
"notification.delete.success": "Tập tin đã được xoá",
|
"notification.delete.success": "Tập tin đã được xoá",
|
||||||
"notification.dropFile.success": "Các tập tin của bạn đã được tải lên",
|
"notification.dropFile.success": "Các tập tin của bạn đã được tải lên",
|
||||||
"notification.dropFiles.success": "{number} tập tin đã được tải lên"
|
"notification.dropFiles.success": "{number} tập tin đã được tải lên",
|
||||||
|
"plugin.description.long": "Quản lý tập tin đa phương tiện.",
|
||||||
|
"plugin.description.short": "Quản lý tập tin đa phương tiện."
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,7 @@
|
|||||||
"notification.dropFile.success": "您的文件已上传",
|
"notification.dropFile.success": "您的文件已上传",
|
||||||
"notification.dropFiles.success": "{number} 个文件已上传",
|
"notification.dropFiles.success": "{number} 个文件已上传",
|
||||||
"Upload.status.sizeLimit": "{file}大于配置的限制大小",
|
"Upload.status.sizeLimit": "{file}大于配置的限制大小",
|
||||||
"Upload.status.disabled" : "文件上传已禁用"
|
"Upload.status.disabled" : "文件上传已禁用",
|
||||||
|
"plugin.description.long": "多媒体档案管理.",
|
||||||
|
"plugin.description.short": "多媒体档案管理."
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,7 @@
|
|||||||
"notification.dropFile.success": "您的檔案已上傳",
|
"notification.dropFile.success": "您的檔案已上傳",
|
||||||
"notification.dropFiles.success": "{number} 個檔案已上傳",
|
"notification.dropFiles.success": "{number} 個檔案已上傳",
|
||||||
"Upload.status.sizeLimit": "{file}大於配置的限制大小",
|
"Upload.status.sizeLimit": "{file}大於配置的限制大小",
|
||||||
"Upload.status.disabled" : "文件上傳已禁用"
|
"Upload.status.disabled" : "文件上傳已禁用",
|
||||||
|
"plugin.description.long": "多媒體檔案管理.",
|
||||||
|
"plugin.description.short": "多媒體檔案管理."
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"strapi": {
|
"strapi": {
|
||||||
"name": "Files Upload",
|
"name": "Files Upload",
|
||||||
"icon": "cloud-upload-alt",
|
"icon": "cloud-upload-alt",
|
||||||
"description": "Description of upload plugin."
|
"description": "upload.plugin.description"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"no tests yet\""
|
"test": "echo \"no tests yet\""
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# strapi-provider-email-sendmail
|
# strapi-provider-email-mailgun
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
/* eslint-disable prefer-template */
|
/* eslint-disable prefer-template */
|
||||||
// Public node modules.
|
// Public node modules.
|
||||||
const _ = require('lodash');
|
const isObject = require('lodash/isObject');
|
||||||
const mailgunFactory = require('mailgun-js');
|
const mailgunFactory = require('mailgun-js');
|
||||||
|
|
||||||
/* eslint-disable no-unused-vars */
|
/* eslint-disable no-unused-vars */
|
||||||
@ -47,21 +47,21 @@ module.exports = {
|
|||||||
send: (options, cb) => {
|
send: (options, cb) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// Default values.
|
// Default values.
|
||||||
options = _.isObject(options) ? options : {};
|
options = isObject(options) ? options : {};
|
||||||
options.from = options.from || config.mailgun_default_from;
|
|
||||||
options.replyTo = options.replyTo || config.mailgun_default_replyto;
|
|
||||||
options.text = options.text || options.html;
|
|
||||||
options.html = options.html || options.text;
|
|
||||||
|
|
||||||
let msg = {
|
let msg = {
|
||||||
from: options.from,
|
from: options.from || config.mailgun_default_from,
|
||||||
to: options.to,
|
to: options.to,
|
||||||
subject: options.subject,
|
subject: options.subject,
|
||||||
text: options.text,
|
...(options.text && { text: options.text }),
|
||||||
html: options.html,
|
...(options.html && { html: options.html }),
|
||||||
|
...(options.template && { template: options.template }),
|
||||||
|
...(options['h:X-Mailgun-Variables'] && {
|
||||||
|
'h:X-Mailgun-Variables': options['h:X-Mailgun-Variables'],
|
||||||
|
}),
|
||||||
...(options.attachment && { attachment: options.attachment }),
|
...(options.attachment && { attachment: options.attachment }),
|
||||||
};
|
};
|
||||||
msg['h:Reply-To'] = options.replyTo;
|
msg['h:Reply-To'] = options.replyTo || config.mailgun_default_replyto;
|
||||||
|
|
||||||
mailgun.messages().send(msg, function(err) {
|
mailgun.messages().send(msg, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user