diff --git a/packages/payload/src/exports/uploads.ts b/packages/payload/src/exports/uploads.ts new file mode 100644 index 0000000000..7e33311642 --- /dev/null +++ b/packages/payload/src/exports/uploads.ts @@ -0,0 +1 @@ +export { default as getFileByPath } from '../uploads/getFileByPath.js' diff --git a/packages/payload/src/exports/utilities.ts b/packages/payload/src/exports/utilities.ts index 809d4d1d7c..3b50ac14e6 100644 --- a/packages/payload/src/exports/utilities.ts +++ b/packages/payload/src/exports/utilities.ts @@ -6,7 +6,6 @@ export { extractTranslations } from '../translations/extractTranslations.js' export { formatFilesize } from '../uploads/formatFilesize.js' -export { default as getFileByPath } from '../uploads/getFileByPath.js' export { default as isImage } from '../uploads/isImage.js' export { combineMerge } from '../utilities/combineMerge.js' diff --git a/test/_community/config.ts b/test/_community/config.ts index 9d78f6d11d..cec8837f57 100644 --- a/test/_community/config.ts +++ b/test/_community/config.ts @@ -1,5 +1,5 @@ import path from 'path' -import { getFileByPath } from 'payload/utilities' +import { getFileByPath } from 'payload/uploads' import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js' import { devUser } from '../credentials.js' diff --git a/test/fields/seed.ts b/test/fields/seed.ts index e42199b6ee..642b26c6c3 100644 --- a/test/fields/seed.ts +++ b/test/fields/seed.ts @@ -1,6 +1,6 @@ import path from 'path' import { type Payload } from 'payload' -import { getFileByPath } from 'payload/utilities' +import { getFileByPath } from 'payload/uploads' import { fileURLToPath } from 'url' import { devUser } from '../credentials.js' diff --git a/test/live-preview/int.spec.ts b/test/live-preview/int.spec.ts index dd6854afa7..d1fd71c607 100644 --- a/test/live-preview/int.spec.ts +++ b/test/live-preview/int.spec.ts @@ -1,7 +1,7 @@ import type { Payload } from 'payload' import path from 'path' -import { getFileByPath } from 'payload/utilities' +import { getFileByPath } from 'payload/uploads' import { fileURLToPath } from 'url' import type { NextRESTClient } from '../helpers/NextRESTClient.js' diff --git a/test/plugin-seo/e2e.spec.ts b/test/plugin-seo/e2e.spec.ts index bd8b44b63b..3aa1a80344 100644 --- a/test/plugin-seo/e2e.spec.ts +++ b/test/plugin-seo/e2e.spec.ts @@ -3,7 +3,7 @@ import type { Payload } from 'payload/types' import { expect, test } from '@playwright/test' import path from 'path' -import { getFileByPath } from 'payload/utilities' +import { getFileByPath } from 'payload/uploads' import { fileURLToPath } from 'url' import type { Page as PayloadPage } from './payload-types.js' diff --git a/test/plugin-seo/int.spec.ts b/test/plugin-seo/int.spec.ts index c57dc9bd6f..10f819a424 100644 --- a/test/plugin-seo/int.spec.ts +++ b/test/plugin-seo/int.spec.ts @@ -1,7 +1,7 @@ import type { Payload } from 'payload' import path from 'path' -import { getFileByPath } from 'payload/utilities' +import { getFileByPath } from 'payload/uploads' import { fileURLToPath } from 'url' import { initPayloadInt } from '../helpers/initPayloadInt.js' diff --git a/test/plugin-seo/seed/index.ts b/test/plugin-seo/seed/index.ts index 11f1e1b279..66ca30edfe 100644 --- a/test/plugin-seo/seed/index.ts +++ b/test/plugin-seo/seed/index.ts @@ -2,7 +2,7 @@ import type { Payload } from 'payload' import type { PayloadRequest } from 'payload/types' import path from 'path' -import { getFileByPath } from 'payload/utilities' +import { getFileByPath } from 'payload/uploads' import { mediaSlug } from '../shared.js' diff --git a/test/uploads/config.ts b/test/uploads/config.ts index 2ec42b3dbe..2360c8b25a 100644 --- a/test/uploads/config.ts +++ b/test/uploads/config.ts @@ -1,5 +1,5 @@ import path from 'path' -import { getFileByPath } from 'payload/utilities' +import { getFileByPath } from 'payload/uploads' import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js' import { devUser } from '../credentials.js' diff --git a/test/uploads/int.spec.ts b/test/uploads/int.spec.ts index 62cbdc99b9..6214754469 100644 --- a/test/uploads/int.spec.ts +++ b/test/uploads/int.spec.ts @@ -5,7 +5,7 @@ import NodeFormData from 'form-data' import fs from 'fs' import path from 'path' import { getPayload } from 'payload' -import { getFileByPath } from 'payload/utilities' +import { getFileByPath } from 'payload/uploads' import { fileURLToPath } from 'url' import { promisify } from 'util'