Skip to content

Implement an ObjectStorageStreamingFileUpload #113

@alvarosanchez

Description

@alvarosanchez

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");
            }
        });
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions