Override strapi's upload plugin's upload method
### Node Version

22.10.0

### NPM/Yarn/PNPM Version

10.9.0

### Strapi Version

5.3.0

### Operating System

Linux (Debian/Ubuntu)

### Database

MySQL

### Javascript or Typescript

Typescript

### Reproduction URL

_No response_

### Bug Description

Within src/index.ts, if you do

```ts
export default {
 
  async bootstrap({ strapi }: { strapi: Core.Strapi }) {
    const uploadPlugin = await strapi.plugin('upload').service('upload');

    console.log('BOOTSTRAP', uploadPlugin);
  },
};
```

it prints out 

```sh
BOOTSTRAP {
  formatFileInfo: [AsyncFunction: formatFileInfo],
  upload: [AsyncFunction: upload2],
  ...
}
```
(by the way, why is the upload function upload2?)


When I try to extend the upload plugin to override the upload method in `src/extensions/upload/strapi-server.ts`, the previous code in the bootstrap function instead of returning an object, it returns a promise. if i await the promise, it returns undefined. I'm overwriting the `plugin.services.upload` property to be a function because that's the structure the plugin object has if I log the plugin to the terminal.

```ts
export default (plugin) => {
  console.log('plugin', plugin);

  const originalUpload = plugin.services.upload;

  console.log('originalUpload', originalUpload);

  plugin.services.upload = async (ctx) => {
    console.log('OVERRIDE UPLOAD');

    await originalUpload(ctx);
  };

  return plugin;
};
```

Side-note: if instead of turning plugin.services.upload into an async function, I turn it into an object, like so,

```ts
export default (plugin) => {
  const originalService = plugin.services.upload;

  plugin.services.upload = {
    ...originalService,
    async upload(ctx) {
      return await originalService.upload(ctx);
    },
  };

  return plugin;
};
```

Strapi basically implodes. If you add the previous code to `src/extensions/upload/strapi-server.ts`, and open Strapi's admin panel, you get a million errors such as

```sh
[2025-03-19 11:06:02.049] error: getService(...).getConfiguration is not a function
[2025-03-19 11:06:07.689] error: getService(...).findPage is not a function
```


### Steps to Reproduce

1. Within src/extensions/upload/strapi-server.ts, add code

```ts
export default (plugin) => {
  console.log('plugin', plugin);

  const originalUpload = plugin.services.upload;

  console.log('originalUpload', originalUpload);

  plugin.services.upload = async (ctx) => {
    console.log('OVERRIDE UPLOAD');

    await originalUpload(ctx);
  };

  return plugin;
};
```

2. Within src/index.ts

```ts
export default {
 
  async bootstrap({ strapi }: { strapi: Core.Strapi }) {
    const uploadPlugin = await strapi.plugin('upload').service('upload');

    console.log('BOOTSTRAP', uploadPlugin);
  },
};
```

3. See `BOOTSTRAP undefined` in the terminal.



### Expected Behavior

To return the upload service object instead of undefined.

### Logs

```shell
Considering the following code:

packages/cms/src/extensions/upload/strapi-server.ts:


export default (plugin) => {
  console.log('plugin', plugin);

  const originalUpload = plugin.services.upload;

  console.log('originalUpload', originalUpload);

  plugin.services.upload = async (ctx) => {
    console.log('OVERRIDE UPLOAD');

    await originalUpload(ctx);
  };

  return plugin;
};


---

src/index.ts


export default {
 
  async bootstrap({ strapi }: { strapi: Core.Strapi }) {
    const uploadPlugin = await strapi.plugin('upload').service('upload');

    console.log('BOOTSTRAP', uploadPlugin);
  },
};


The logs are as follows:


✔ Building build context (107ms)
✔ Creating admin (300ms)
⠇ Loading Strapiplugin {
  bootstrap: [AsyncFunction: bootstrap],
  destroy: [Function: destroy],
  register: [AsyncFunction: register],
  config: {
    enabled: true,
    provider: 'local',
    sizeLimit: 1000000000,
    actionOptions: {}
  },
  routes: {
    admin: { type: 'admin', routes: [Array] },
    'content-api': { type: 'content-api', routes: [Array] },
    viewConfiguration: { type: 'admin', routes: [Array] }
  },
  controllers: {
    'admin-file': {
      find: [AsyncFunction: find],
      findOne: [AsyncFunction: findOne],
      destroy: [AsyncFunction: destroy]
    },
    'admin-folder': {
      findOne: [AsyncFunction: findOne],
      find: [AsyncFunction: find],
      create: [AsyncFunction: create],
      update: [AsyncFunction: update],
      getStructure: [AsyncFunction: getStructure]
    },
    'admin-folder-file': {
      deleteMany: [AsyncFunction: deleteMany],
      moveMany: [AsyncFunction: moveMany]
    },
    'admin-settings': {
      updateSettings: [AsyncFunction: updateSettings],
      getSettings: [AsyncFunction: getSettings]
    },
    'admin-upload': {
      updateFileInfo: [AsyncFunction: updateFileInfo],
      replaceFile: [AsyncFunction: replaceFile],
      uploadFiles: [AsyncFunction: uploadFiles],
      upload: [AsyncFunction: upload]
    },
    'content-api': [Function: contentApi],
    'view-configuration': {
      updateViewConfiguration: [AsyncFunction: updateViewConfiguration],
      findViewConfiguration: [AsyncFunction: findViewConfiguration]
    }
  },
  services: {
    provider: [Function: provider],
    upload: [Function: upload],
    folder: {
      create: [AsyncFunction: create],
      exists: [AsyncFunction: exists],
      deleteByIds: [AsyncFunction: deleteByIds$1],
      update: [AsyncFunction: update],
      setPathIdAndPath: [AsyncFunction: setPathIdAndPath],
      getStructure: [AsyncFunction: getStructure]
    },
    file: {
      getFolderPath: [AsyncFunction: getFolderPath],
      deleteByIds: [AsyncFunction: deleteByIds],
      signFileUrls: [AsyncFunction: signFileUrls]
    },
    weeklyMetrics: [Function: weeklyMetrics],
    metrics: [Function: metrics],
    'image-manipulation': {
      isFaultyImage: [AsyncFunction: isFaultyImage],
      isOptimizableImage: [AsyncFunction: isOptimizableImage],
      isResizableImage: [AsyncFunction: isResizableImage],
      isImage: [AsyncFunction: isImage],
      getDimensions: [AsyncFunction: getDimensions],
      generateResponsiveFormats: [AsyncFunction: generateResponsiveFormats],
      generateThumbnail: [AsyncFunction: generateThumbnail],
      optimize: [AsyncFunction: optimize]
    },
    'api-upload-folder': { getAPIUploadFolder: [AsyncFunction: getAPIUploadFolder] },
    extensions: {
      signFileUrlsOnDocumentService: [AsyncFunction: signFileUrlsOnDocumentService]
    }
  },
  policies: {},
  middlewares: {},
  contentTypes: { file: { schema: [Object] }, folder: { schema: [Object] } }
}
originalUpload [Function: upload]

...

BOOTSTRAP undefined

✔ Loading Strapi (1744ms)
✔ Generating types (360ms)
✔ Cleaning dist dir (70ms)
✔ Compiling TS (3240ms)
```

### Code Snippets

_No response_

### Media

_No response_

### Additional information

_No response_

### Confirmation Checklist

- [x] I have checked the existing [issues](https://github.com/strapi/strapi/issues) for duplicates.
- [x] I agree to follow this project's [Code of Conduct](https://github.com/strapi/strapi/blob/develop/CODE_OF_CONDUCT.md).