Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement an ObjectStorageStreamingFileUpload #113

Open
alvarosanchez opened this issue Sep 7, 2022 · 1 comment
Open

Implement an ObjectStorageStreamingFileUpload #113

alvarosanchez opened this issue Sep 7, 2022 · 1 comment
Labels
type: enhancement New feature or request

Comments

@alvarosanchez
Copy link
Member

The idea would be that the transferTo() method could use the new URI formats from #112:

public Publisher<HttpResponse<String>> upload(ObjectStorageStreamingFileUpload upload){
    Publisher<Boolean> uploadPublisher = file.transferTo("public-image://www/uploads/" + upload.getFilename());
    return Mono.from(uploadPublisher)  
        .map(success -> {
            if (success) {
                return HttpResponse.ok("Uploaded");
            } else {
                return HttpResponse.<String>status(CONFLICT)
                                   .body("Upload Failed");
            }
        });
}
@alvarosanchez alvarosanchez added the type: enhancement New feature or request label Sep 7, 2022
yawkat added a commit to micronaut-projects/micronaut-core that referenced this issue Aug 28, 2023
Repurpose some existing publisher->stream code to implement StreamingFileUpload.asInputStream. This will be useful for micronaut-projects/micronaut-object-storage#113
yawkat added a commit to micronaut-projects/micronaut-core that referenced this issue Aug 29, 2023
* Add StreamingFileUpload.asInputStream
Repurpose some existing publisher->stream code to implement StreamingFileUpload.asInputStream. This will be useful for micronaut-projects/micronaut-object-storage#113

* move PublisherAsBlocking, make it non-abstract

* nonnull
@scprek
Copy link

scprek commented Apr 29, 2024

Any progress on this? Looks like implementation specific solutions going out? #424 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants