diff --git a/app/common/src/main/java/stirling/software/common/aop/AutoJobAspect.java b/app/common/src/main/java/stirling/software/common/aop/AutoJobAspect.java index 9b700c3fe7..4b57b64f90 100644 --- a/app/common/src/main/java/stirling/software/common/aop/AutoJobAspect.java +++ b/app/common/src/main/java/stirling/software/common/aop/AutoJobAspect.java @@ -16,7 +16,7 @@ import org.slf4j.MDC; // MultipartFile) and PDFFile.getFileInput()/setFileInput(MultipartFile). Changing the type here // would ripple into FileStorage and PDFFile public signatures, so the original type is kept until // those collaborators are migrated. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import jakarta.annotation.Priority; import jakarta.enterprise.context.ApplicationScoped; diff --git a/app/common/src/main/java/stirling/software/common/model/MultipartFile.java b/app/common/src/main/java/stirling/software/common/model/MultipartFile.java new file mode 100644 index 0000000000..adbf8225db --- /dev/null +++ b/app/common/src/main/java/stirling/software/common/model/MultipartFile.java @@ -0,0 +1,49 @@ +package stirling.software.common.model; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; + +/** + * Migration compatibility shim for Spring's {@code org.springframework.web.multipart.MultipartFile}. + * + *

Quarkus/JAX-RS has no drop-in equivalent for the {@code MultipartFile} abstraction that the + * service layer relies on (it exposes {@code org.jboss.resteasy.reactive.multipart.FileUpload} at + * the REST boundary instead). To avoid rewriting the public signatures of dozens of service and + * util methods across every module, this interface mirrors the subset of Spring's API that the + * codebase actually uses. Controllers adapt the inbound {@code FileUpload}/{@code byte[]} to one of + * the implementations ({@link stirling.software.common.model.multipart.ByteArrayMultipartFile}, + * {@link stirling.software.common.model.multipart.FileUploadMultipartFile}) and pass it down + * unchanged. + * + *

TODO: Migration required - longer term, the REST boundary should standardise on + * {@code FileUpload}/{@code @RestForm} and this shim can be retired. + */ +public interface MultipartFile { + + String getName(); + + String getOriginalFilename(); + + String getContentType(); + + boolean isEmpty(); + + long getSize(); + + byte[] getBytes() throws IOException; + + InputStream getInputStream() throws IOException; + + default void transferTo(File dest) throws IOException { + transferTo(dest.toPath()); + } + + default void transferTo(Path dest) throws IOException { + try (InputStream in = getInputStream()) { + Files.copy(in, dest); + } + } +} diff --git a/app/common/src/main/java/stirling/software/common/model/api/GeneralFile.java b/app/common/src/main/java/stirling/software/common/model/api/GeneralFile.java index b134eee58c..79d91155a4 100644 --- a/app/common/src/main/java/stirling/software/common/model/api/GeneralFile.java +++ b/app/common/src/main/java/stirling/software/common/model/api/GeneralFile.java @@ -5,7 +5,7 @@ package stirling.software.common.model.api; // consumed by controllers/services across the codebase; changing the type (e.g. to // byte[]/InputStream or jakarta.ws.rs form params) would ripple to every caller. // Keep the Spring type for now and rebind during the web-layer migration. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/app/common/src/main/java/stirling/software/common/model/api/PDFFile.java b/app/common/src/main/java/stirling/software/common/model/api/PDFFile.java index 02a5533f2b..d6eef99f5f 100644 --- a/app/common/src/main/java/stirling/software/common/model/api/PDFFile.java +++ b/app/common/src/main/java/stirling/software/common/model/api/PDFFile.java @@ -4,7 +4,7 @@ package stirling.software.common.model.api; // servlet/JAX-RS drop-in for a DTO field type. Changing this public field type to // byte[]/InputStream or a JAX-RS multipart type would ripple to all callers and the // API binding layer, so the type is kept until callers are migrated together. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/app/common/src/main/java/stirling/software/common/model/multipart/ByteArrayMultipartFile.java b/app/common/src/main/java/stirling/software/common/model/multipart/ByteArrayMultipartFile.java new file mode 100644 index 0000000000..2472a26482 --- /dev/null +++ b/app/common/src/main/java/stirling/software/common/model/multipart/ByteArrayMultipartFile.java @@ -0,0 +1,61 @@ +package stirling.software.common.model.multipart; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; + +import stirling.software.common.model.MultipartFile; + +/** + * In-memory {@link MultipartFile} backed by a byte array. Useful for tests and for code paths that + * synthesize file content (migration shim - see {@link MultipartFile}). + */ +public class ByteArrayMultipartFile implements MultipartFile { + + private final String name; + private final String originalFilename; + private final String contentType; + private final byte[] content; + + public ByteArrayMultipartFile( + String name, String originalFilename, String contentType, byte[] content) { + this.name = name; + this.originalFilename = originalFilename; + this.contentType = contentType; + this.content = content != null ? content : new byte[0]; + } + + @Override + public String getName() { + return name; + } + + @Override + public String getOriginalFilename() { + return originalFilename; + } + + @Override + public String getContentType() { + return contentType; + } + + @Override + public boolean isEmpty() { + return content.length == 0; + } + + @Override + public long getSize() { + return content.length; + } + + @Override + public byte[] getBytes() { + return content; + } + + @Override + public InputStream getInputStream() { + return new ByteArrayInputStream(content); + } +} diff --git a/app/common/src/main/java/stirling/software/common/model/multipart/FileUploadMultipartFile.java b/app/common/src/main/java/stirling/software/common/model/multipart/FileUploadMultipartFile.java new file mode 100644 index 0000000000..49c9509781 --- /dev/null +++ b/app/common/src/main/java/stirling/software/common/model/multipart/FileUploadMultipartFile.java @@ -0,0 +1,69 @@ +package stirling.software.common.model.multipart; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; + +import org.jboss.resteasy.reactive.multipart.FileUpload; + +import stirling.software.common.model.MultipartFile; + +/** + * Adapts a Quarkus REST {@link FileUpload} (the inbound multipart representation at the JAX-RS + * boundary) to the {@link MultipartFile} migration shim, so controllers can pass uploads down to + * the existing service layer without changing its method signatures. + */ +public class FileUploadMultipartFile implements MultipartFile { + + private final FileUpload delegate; + + public FileUploadMultipartFile(FileUpload delegate) { + this.delegate = delegate; + } + + /** Null-safe factory: returns null when the upload is absent. */ + public static MultipartFile of(FileUpload upload) { + return upload == null ? null : new FileUploadMultipartFile(upload); + } + + @Override + public String getName() { + return delegate.name(); + } + + @Override + public String getOriginalFilename() { + return delegate.fileName(); + } + + @Override + public String getContentType() { + return delegate.contentType(); + } + + @Override + public boolean isEmpty() { + return getSize() == 0; + } + + @Override + public long getSize() { + return delegate.size(); + } + + @Override + public byte[] getBytes() throws IOException { + return Files.readAllBytes(delegate.uploadedFile()); + } + + @Override + public InputStream getInputStream() throws IOException { + return Files.newInputStream(delegate.uploadedFile()); + } + + @Override + public void transferTo(Path dest) throws IOException { + Files.copy(delegate.uploadedFile(), dest); + } +} diff --git a/app/common/src/main/java/stirling/software/common/service/CustomPDFDocumentFactory.java b/app/common/src/main/java/stirling/software/common/service/CustomPDFDocumentFactory.java index 7a473bfeb3..507056b2c3 100644 --- a/app/common/src/main/java/stirling/software/common/service/CustomPDFDocumentFactory.java +++ b/app/common/src/main/java/stirling/software/common/service/CustomPDFDocumentFactory.java @@ -29,7 +29,7 @@ import org.apache.pdfbox.pdmodel.PDDocument; // (controllers/other services) span the codebase; changing these public signatures to byte[]/ // InputStream would ripple widely. The original import and type are kept intact pending a // coordinated migration of all callers. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; diff --git a/app/common/src/main/java/stirling/software/common/service/FileOrUploadService.java b/app/common/src/main/java/stirling/software/common/service/FileOrUploadService.java index b9689b8bd2..02e66ca222 100644 --- a/app/common/src/main/java/stirling/software/common/service/FileOrUploadService.java +++ b/app/common/src/main/java/stirling/software/common/service/FileOrUploadService.java @@ -12,7 +12,7 @@ import org.eclipse.microprofile.config.inject.ConfigProperty; // JAX-RS/servlet drop-in. It is used as a public method return type and implemented by the // inner CustomMultipartFile class; converting the type would ripple to all callers. Keeping // the Spring type for now to preserve the public signature and behavior. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import lombok.RequiredArgsConstructor; diff --git a/app/common/src/main/java/stirling/software/common/service/FileStorage.java b/app/common/src/main/java/stirling/software/common/service/FileStorage.java index 030423f776..d5d96c39d3 100644 --- a/app/common/src/main/java/stirling/software/common/service/FileStorage.java +++ b/app/common/src/main/java/stirling/software/common/service/FileStorage.java @@ -18,7 +18,7 @@ import org.springframework.core.io.Resource; // TODO: Migration required - org.springframework.web.multipart.MultipartFile is used in public // method signatures (storeFile, retrieveFile). No servlet/JAX-RS drop-in for utility method // params; changing it would ripple widely into callers. Keeping the type. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; // TODO: Migration required - org.springframework.web.servlet.mvc.method.annotation // .StreamingResponseBody is used in the public storeFromStreamingBody signature. No Quarkus/JAX-RS // drop-in; converting would ripple into callers. Keeping the type. diff --git a/app/common/src/main/java/stirling/software/common/service/JobExecutorService.java b/app/common/src/main/java/stirling/software/common/service/JobExecutorService.java index e3f4353d8c..52cccfa0d9 100644 --- a/app/common/src/main/java/stirling/software/common/service/JobExecutorService.java +++ b/app/common/src/main/java/stirling/software/common/service/JobExecutorService.java @@ -24,7 +24,7 @@ import org.springframework.http.ResponseEntity; // TODO: Migration required - org.springframework.web.multipart.MultipartFile has no // JAX-RS drop-in for these utility method params; changing the type would ripple to // callers, so it is kept as-is for now. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; // TODO: Migration required - org.springframework.web.servlet.mvc.method.annotation // .StreamingResponseBody is a Spring MVC servlet type with no JAX-RS equivalent here; // it is consumed by FileStorage#storeFromStreamingBody and kept as-is for now. diff --git a/app/common/src/main/java/stirling/software/common/service/MobileScannerService.java b/app/common/src/main/java/stirling/software/common/service/MobileScannerService.java index d411b772e5..b8be89ad83 100644 --- a/app/common/src/main/java/stirling/software/common/service/MobileScannerService.java +++ b/app/common/src/main/java/stirling/software/common/service/MobileScannerService.java @@ -18,7 +18,7 @@ import io.quarkus.scheduler.Scheduled; // drop-in. uploadFiles(...) is a public API consumed by callers and relies on isEmpty(), // getOriginalFilename(), getSize(), getContentType() and transferTo(Path). Changing it to // byte[]/InputStream would ripple to callers, so the Spring type is kept here intentionally. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import lombok.extern.slf4j.Slf4j; diff --git a/app/common/src/main/java/stirling/software/common/util/CbrUtils.java b/app/common/src/main/java/stirling/software/common/util/CbrUtils.java index ae002dd0ea..0ee81b9701 100644 --- a/app/common/src/main/java/stirling/software/common/util/CbrUtils.java +++ b/app/common/src/main/java/stirling/software/common/util/CbrUtils.java @@ -20,7 +20,7 @@ import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject; // MultipartFile and rely on isEmpty()/getOriginalFilename()/transferTo(File), which are // MultipartFile-specific. Converting the signatures (e.g. to byte[]/InputStream) would ripple // to all callers, so the type is intentionally kept until the calling endpoints are migrated. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import com.github.junrar.Archive; import com.github.junrar.exception.CorruptHeaderException; diff --git a/app/common/src/main/java/stirling/software/common/util/CbzUtils.java b/app/common/src/main/java/stirling/software/common/util/CbzUtils.java index 9d1e3d6c39..51e5bb56f6 100644 --- a/app/common/src/main/java/stirling/software/common/util/CbzUtils.java +++ b/app/common/src/main/java/stirling/software/common/util/CbzUtils.java @@ -24,7 +24,7 @@ import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject; // drop-in for these utility method parameters. The type appears in public method signatures // (convertCbzToPdf, isCbzFile, isComicBookFile) consumed by other modules; switching to // byte[]/InputStream would ripple across callers. Keep the Spring type until callers migrate. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import lombok.experimental.UtilityClass; import lombok.extern.slf4j.Slf4j; diff --git a/app/common/src/main/java/stirling/software/common/util/GeneralUtils.java b/app/common/src/main/java/stirling/software/common/util/GeneralUtils.java index a465059ff8..a8dc3d87e2 100644 --- a/app/common/src/main/java/stirling/software/common/util/GeneralUtils.java +++ b/app/common/src/main/java/stirling/software/common/util/GeneralUtils.java @@ -29,7 +29,7 @@ import org.springframework.core.io.support.ResourcePatternUtils; // drop-in for these utility method params. The public signatures of convertMultipartFileToFile and // multipartToFile are used by many callers, so the type is kept to avoid a wide ripple. Revisit to // accept InputStream/byte[] or a JAX-RS form-data type once callers are migrated. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import com.fathzer.soft.javaluator.DoubleEvaluator; diff --git a/app/common/src/main/java/stirling/software/common/util/ImageProcessingUtils.java b/app/common/src/main/java/stirling/software/common/util/ImageProcessingUtils.java index a04c0b80a4..f3179c7e9b 100644 --- a/app/common/src/main/java/stirling/software/common/util/ImageProcessingUtils.java +++ b/app/common/src/main/java/stirling/software/common/util/ImageProcessingUtils.java @@ -16,7 +16,7 @@ import javax.imageio.stream.ImageInputStream; // drop-in. loadImageWithExifOrientation(MultipartFile) is a public utility used by callers that // pass Spring MultipartFile; converting to byte[]/InputStream would change the public signature // and ripple to those callers. Keep the type until callers are migrated. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import com.drew.imaging.ImageMetadataReader; import com.drew.imaging.ImageProcessingException; diff --git a/app/common/src/main/java/stirling/software/common/util/PDFToFile.java b/app/common/src/main/java/stirling/software/common/util/PDFToFile.java index 4c03d90329..2226372f59 100644 --- a/app/common/src/main/java/stirling/software/common/util/PDFToFile.java +++ b/app/common/src/main/java/stirling/software/common/util/PDFToFile.java @@ -31,7 +31,7 @@ import org.springframework.core.io.Resource; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import com.vladsch.flexmark.html2md.converter.FlexmarkHtmlConverter; import com.vladsch.flexmark.util.data.MutableDataSet; diff --git a/app/common/src/main/java/stirling/software/common/util/PdfAttachmentHandler.java b/app/common/src/main/java/stirling/software/common/util/PdfAttachmentHandler.java index 0ee37765d3..544c50f322 100644 --- a/app/common/src/main/java/stirling/software/common/util/PdfAttachmentHandler.java +++ b/app/common/src/main/java/stirling/software/common/util/PdfAttachmentHandler.java @@ -47,7 +47,7 @@ import jakarta.ws.rs.core.MediaType; // MultipartFile implementation with a custom byte[]/InputStream holder and reworking the private // addAttachmentsToDocumentWithMapping signature. Kept as-is to preserve behavior; revisit to // introduce a Quarkus-friendly attachment abstraction. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import lombok.Data; import lombok.Getter; diff --git a/app/common/src/main/java/stirling/software/common/util/PdfToCbrUtils.java b/app/common/src/main/java/stirling/software/common/util/PdfToCbrUtils.java index b2eeacd3b8..8b0c39912e 100644 --- a/app/common/src/main/java/stirling/software/common/util/PdfToCbrUtils.java +++ b/app/common/src/main/java/stirling/software/common/util/PdfToCbrUtils.java @@ -22,7 +22,7 @@ import org.apache.pdfbox.rendering.PDFRenderer; // (convertPdfToCbr/validatePdfFile/isPdfFile) consumed by callers; changing it to // byte[]/InputStream would ripple widely, so the type is intentionally kept until callers // are migrated. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import lombok.extern.slf4j.Slf4j; diff --git a/app/common/src/main/java/stirling/software/common/util/PdfToCbzUtils.java b/app/common/src/main/java/stirling/software/common/util/PdfToCbzUtils.java index 49e2920148..4bbb49c7fb 100644 --- a/app/common/src/main/java/stirling/software/common/util/PdfToCbzUtils.java +++ b/app/common/src/main/java/stirling/software/common/util/PdfToCbzUtils.java @@ -17,7 +17,7 @@ import org.apache.pdfbox.rendering.PDFRenderer; // JAX-RS drop-in for these public static utility method params. Converting to byte[]/ // InputStream would change widely-used public signatures (convertPdfToCbz, isPdfFile, // validatePdfFile) and ripple to callers, so the type is kept until callers are migrated. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import lombok.extern.slf4j.Slf4j; diff --git a/app/common/src/main/java/stirling/software/common/util/PdfUtils.java b/app/common/src/main/java/stirling/software/common/util/PdfUtils.java index cce15dd7f5..02b817ac9d 100644 --- a/app/common/src/main/java/stirling/software/common/util/PdfUtils.java +++ b/app/common/src/main/java/stirling/software/common/util/PdfUtils.java @@ -38,7 +38,7 @@ import org.apache.pdfbox.text.PDFTextStripper; // getOriginalFilename(), getInputStream() and ImageProcessingUtils.loadImageWithExifOrientation(file). // Changing the public signature would ripple across all callers, so the type is kept for now and // must be re-migrated together with its callers (e.g. to a JAX-RS multipart form / byte[] / InputStream). -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import io.github.pixee.security.Filenames; diff --git a/app/common/src/main/java/stirling/software/common/util/TempFileManager.java b/app/common/src/main/java/stirling/software/common/util/TempFileManager.java index 78702441c5..07bb131089 100644 --- a/app/common/src/main/java/stirling/software/common/util/TempFileManager.java +++ b/app/common/src/main/java/stirling/software/common/util/TempFileManager.java @@ -13,7 +13,7 @@ import jakarta.enterprise.context.ApplicationScoped; // TODO: Migration required - org.springframework.web.multipart.MultipartFile has no JAX-RS // drop-in. Kept to preserve the public convertMultipartFileToFile signature used by callers; // migrate to byte[]/InputStream or a Quarkus multipart type once callers are updated. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/app/common/src/main/java/stirling/software/common/util/WebResponseUtils.java b/app/common/src/main/java/stirling/software/common/util/WebResponseUtils.java index f4632b32e0..c6395a0213 100644 --- a/app/common/src/main/java/stirling/software/common/util/WebResponseUtils.java +++ b/app/common/src/main/java/stirling/software/common/util/WebResponseUtils.java @@ -27,7 +27,7 @@ import org.springframework.http.ResponseEntity; // drop-in for a utility method parameter. Converting multiPartFileToWebResponse to accept // byte[]/InputStream would ripple through every caller, so the Spring type and its import are kept // here intentionally. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; diff --git a/app/common/src/main/java/stirling/software/common/util/misc/ColorSpaceConversionStrategy.java b/app/common/src/main/java/stirling/software/common/util/misc/ColorSpaceConversionStrategy.java index d4ae968fe2..ddcdbbf75a 100644 --- a/app/common/src/main/java/stirling/software/common/util/misc/ColorSpaceConversionStrategy.java +++ b/app/common/src/main/java/stirling/software/common/util/misc/ColorSpaceConversionStrategy.java @@ -16,7 +16,7 @@ import org.springframework.core.io.InputStreamResource; // the superclass ctor ReplaceAndInvertColorStrategy(MultipartFile, ReplaceAndInvert) requires it. // No JAX-RS drop-in exists for this constructor param without rippling changes to the parent and // every caller, so the type is preserved here. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import lombok.extern.slf4j.Slf4j; diff --git a/app/common/src/main/java/stirling/software/common/util/misc/CustomColorReplaceStrategy.java b/app/common/src/main/java/stirling/software/common/util/misc/CustomColorReplaceStrategy.java index 7499aba934..f1122a069d 100644 --- a/app/common/src/main/java/stirling/software/common/util/misc/CustomColorReplaceStrategy.java +++ b/app/common/src/main/java/stirling/software/common/util/misc/CustomColorReplaceStrategy.java @@ -28,7 +28,7 @@ import org.springframework.core.io.InputStreamResource; // the parent ReplaceAndInvertColorStrategy(MultipartFile, ReplaceAndInvert) constructor (not in // scope for this migration). There is no JAX-RS drop-in for this widely used public signature; // retained until the parent and its callers are migrated together. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import lombok.extern.slf4j.Slf4j; diff --git a/app/common/src/main/java/stirling/software/common/util/misc/InvertFullColorStrategy.java b/app/common/src/main/java/stirling/software/common/util/misc/InvertFullColorStrategy.java index a9123ab367..aa1e17b8a7 100644 --- a/app/common/src/main/java/stirling/software/common/util/misc/InvertFullColorStrategy.java +++ b/app/common/src/main/java/stirling/software/common/util/misc/InvertFullColorStrategy.java @@ -26,7 +26,7 @@ import org.springframework.core.io.InputStreamResource; // for these constructor params. The parent class ReplaceAndInvertColorStrategy declares the same // MultipartFile constructor parameter; changing the public signature here would diverge from the // parent and ripple to callers, so the type is kept until the parent/callers are migrated. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import lombok.extern.slf4j.Slf4j; diff --git a/app/common/src/main/java/stirling/software/common/util/misc/ReplaceAndInvertColorStrategy.java b/app/common/src/main/java/stirling/software/common/util/misc/ReplaceAndInvertColorStrategy.java index 37f6607cdc..865ddb3d4e 100644 --- a/app/common/src/main/java/stirling/software/common/util/misc/ReplaceAndInvertColorStrategy.java +++ b/app/common/src/main/java/stirling/software/common/util/misc/ReplaceAndInvertColorStrategy.java @@ -11,7 +11,7 @@ import org.springframework.core.io.InputStreamResource; // the inherited PDFFile.setFileInput(MultipartFile) (PDFFile keeps this type for the same // reason); changing this constructor parameter would ripple to callers and the API binding // layer, so the type is kept until PDFFile and its callers are migrated together. -import org.springframework.web.multipart.MultipartFile; +import stirling.software.common.model.MultipartFile; import lombok.Data; import lombok.EqualsAndHashCode;