diff --git a/docs/maps/import-geospatial-data.asciidoc b/docs/maps/import-geospatial-data.asciidoc index 7a35b7d1df599..3746b21437a44 100644 --- a/docs/maps/import-geospatial-data.asciidoc +++ b/docs/maps/import-geospatial-data.asciidoc @@ -6,9 +6,6 @@ To import geospatical data into the Elastic Stack, the data must be indexed as { Geospatial data comes in many formats. Choose an import tool based on the format of your geospatial data. -TIP: When you upload files in {kib}, there is a file size -limit, which is configurable in <>. - [discrete] [[import-geospatial-privileges]] === Security privileges diff --git a/x-pack/plugins/file_upload/public/components/geo_upload_form/geo_file_picker.tsx b/x-pack/plugins/file_upload/public/components/geo_upload_form/geo_file_picker.tsx index a349a5b82d372..f813abb1510d7 100644 --- a/x-pack/plugins/file_upload/public/components/geo_upload_form/geo_file_picker.tsx +++ b/x-pack/plugins/file_upload/public/components/geo_upload_form/geo_file_picker.tsx @@ -9,7 +9,6 @@ import React, { Component } from 'react'; import { EuiFilePicker, EuiFormRow } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { MB } from '../../../common/constants'; -import { getMaxBytesFormatted } from '../../importer/get_max_bytes'; import { GEO_FILE_TYPES, geoImporterFactory } from '../../importer/geo'; import type { GeoFileImporter, GeoFilePreview } from '../../importer/geo'; @@ -135,11 +134,6 @@ export class GeoFilePicker extends Component { defaultMessage: 'Formats accepted: {fileTypes}', values: { fileTypes: GEO_FILE_TYPES.join(', ') }, })} -
- {i18n.translate('xpack.fileUpload.geoFilePicker.maxSize', { - defaultMessage: 'Max size: {maxFileSize}', - values: { maxFileSize: getMaxBytesFormatted() }, - })} ); } diff --git a/x-pack/plugins/file_upload/public/importer/geo/index.ts b/x-pack/plugins/file_upload/public/importer/geo/index.ts index fd75d17ec5e71..a88249194513d 100644 --- a/x-pack/plugins/file_upload/public/importer/geo/index.ts +++ b/x-pack/plugins/file_upload/public/importer/geo/index.ts @@ -11,9 +11,10 @@ import { ShapefileImporter, SHAPEFILE_TYPES } from './shapefile_importer'; import { getFileExtension, validateFile } from '../validate_file'; export const GEO_FILE_TYPES = [...GEOJSON_FILE_TYPES, ...SHAPEFILE_TYPES]; +const OPTIONS = { checkSizeLimit: false }; export function geoImporterFactory(file: File): GeoFileImporter { - validateFile(file, GEO_FILE_TYPES); + validateFile(file, GEO_FILE_TYPES, OPTIONS); const extension = getFileExtension(file); return GEOJSON_FILE_TYPES.includes(extension) diff --git a/x-pack/plugins/file_upload/public/importer/validate_file.ts b/x-pack/plugins/file_upload/public/importer/validate_file.ts index 0a087e91a63f3..b3f69c7b82921 100644 --- a/x-pack/plugins/file_upload/public/importer/validate_file.ts +++ b/x-pack/plugins/file_upload/public/importer/validate_file.ts @@ -16,8 +16,8 @@ export function getFileExtension(file: File) { return '.' + extension; } -export function validateFile(file: File, types: string[]) { - if (file.size > getMaxBytes()) { +export function validateFile(file: File, types: string[], options?: { checkSizeLimit?: boolean }) { + if (file.size > getMaxBytes() && options?.checkSizeLimit) { throw new Error( i18n.translate('xpack.fileUpload.fileSizeError', { defaultMessage: 'File size {fileSize} exceeds maximum file size of {maxFileSize}', diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index a718d1235cc79..6f386dfeccdd2 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -11628,7 +11628,6 @@ "xpack.fileUpload.fileTypeError": "ファイルは使用可能なタイプのいずれかではありません。{types}", "xpack.fileUpload.geoFilePicker.acceptedFormats": "使用可能な形式:{fileTypes}", "xpack.fileUpload.geoFilePicker.filePicker": "ファイルを選択するかドラッグ &amp; ドロップしてください", - "xpack.fileUpload.geoFilePicker.maxSize": "最大サイズ:{maxFileSize}", "xpack.fileUpload.geoFilePicker.noFeaturesDetected": "選択したファイルには特徴量がありません。", "xpack.fileUpload.geoFilePicker.previewSummary": "{numFeatures}個の特徴量。ファイルの{previewCoverage}%。", "xpack.fileUpload.geojsonImporter.noGeometry": "特長量には必須フィールド「ジオメトリ」が含まれていません", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 37e7b73f88ebb..6a8d154b5b6c0 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -11649,7 +11649,6 @@ "xpack.fileUpload.fileTypeError": "文件不是可接受类型之一:{types}", "xpack.fileUpload.geoFilePicker.acceptedFormats": "接受的格式:{fileTypes}", "xpack.fileUpload.geoFilePicker.filePicker": "选择或拖放文件", - "xpack.fileUpload.geoFilePicker.maxSize": "最大大小:{maxFileSize}", "xpack.fileUpload.geoFilePicker.noFeaturesDetected": "选定文件中未找到任何特征。", "xpack.fileUpload.geoFilePicker.previewSummary": "正在预览 {numFeatures} 个特征、{previewCoverage}% 的文件。", "xpack.fileUpload.geojsonImporter.noGeometry": "特征不包含必需的字段“geometry”",