Halo modified the [class loading order](https://github.com/halo-dev/halo/pull/4663) of plugins in 2.10.x to P (Plugin) D (Dependencies) A (Application), resulting in a LinkageError when the current plugin is actually run.
```java
java.lang.LinkageError: loader constraint violation: when resolving method 'reactor.core.publisher.Flux reactor.core.publisher.Mono.thenMany(org.reactivestreams.Publisher)' the class loader org.pf4j.PluginClassLoader @5da2e534 of the current class, run/halo/s3os/S3OsAttachmentHandler, and the class loader org.springframework.boot.loader.LaunchedURLClassLoader @87aac27 for the method's defining class, reactor/core/publisher/Mono, have different Class objects for the type org/reactivestreams/Publisher used in the signature (run.halo.s3os.S3OsAttachmentHandler is in unnamed module of loader org.pf4j.PluginClassLoader @5da2e534, parent loader org.springframework.boot.loader.LaunchedURLClassLoader @87aac27; reactor.core.publisher.Mono is in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @87aac27, parent loader 'app')
at run.halo.s3os.S3OsAttachmentHandler.lambda$upload$28(S3OsAttachmentHandler.java:298) ~[na:na]
at reactor.core.publisher.MonoUsing.subscribe(MonoUsing.java:85) ~[reactor-core-3.5.10.jar:3.5.10]
at reactor.core.publisher.Mono.subscribe(Mono.java:4495) ~[reactor-core-3.5.10.jar:3.5.10]
at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:126) ~[reactor-core-3.5.10.jar:3.5.10]
at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) ~[reactor-core-3.5.10.jar:3.5.10]
at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) ~[reactor-core-3.5.10.jar:3.5.10]
at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
```
We just remove the reactive-streams dependency that is already in Halo to resolve the problem.
Fixes https://github.com/halo-dev/halo/issues/4676
/kind bug
```release-note
修复在 Halo 2.10 中无法正常上传的问题
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
See https://github.com/halo-sigs/plugin-s3/issues/56 for more.
This PR skips permalink resolution while the object key is missing. So that the default handler will resolve permalink from annotation `storage.halo.run/external-link`
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-sigs/plugin-s3/issues/56
#### Does this PR introduce a user-facing change?
```release-note
解决导入 Halo 1.x 附件后出现“Cannot obtain object key from attachment attachment-xyz”的问题
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
Reshape the DataBuffers into parts of the same size (5MB) except for the last part.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-sigs/plugin-s3/issues/49
#### Does this PR introduce a user-facing change?
```release-note
保证分片上传时片段大小一致
```
On the Halo side, PR https://github.com/halo-dev/halo/pull/3740 has already added two new methods (`getSharedURL` and `getPermalink`) into AttachmentHandler. Now It's time to implement these two methods so that users can correctly and easily use these two methods.
This PR mainly implements [new AttachmentHandler](11a5807682/api/src/main/java/run/halo/app/core/extension/attachment/endpoint/AttachmentHandler.java). At the same time, I also refactored the build script for a better development experience.
Please note that, those changes might not influence compatibility with Halo 2.0.0. You can have test against Halo 2.0.0 manually.
/kind feature
```release-note
支持获取分享链接和永久链接
```