-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: Integration with OCI Object Storage temp
task: 8697bjvqr
- Loading branch information
Showing
7 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
backend/src/main/java/meowhub/backend/ext/oci/MockOCIUploadServiceConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package meowhub.backend.ext.oci; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.Primary; | ||
import org.springframework.context.annotation.Profile; | ||
import org.springframework.web.multipart.MultipartFile; | ||
|
||
@Configuration | ||
@Profile("mock-oci") | ||
public class MockOCIUploadServiceConfig { | ||
@Bean | ||
@Primary | ||
public OCIUploadService mockOCIUploadService() { | ||
return new OCIUploadService() { | ||
@Override | ||
public void upload(MultipartFile file, String objectName) throws Exception { | ||
System.out.println("Mock upload: " + objectName); | ||
} | ||
|
||
@Override | ||
public String getFileObjectUrl(String objectName) throws Exception { | ||
return "https://mock.objectstorage.local/" + objectName; | ||
} | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...backend/shared/pictures/PictureUtils.java → ...ub/backend/shared/utils/PictureUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters