backend/src/main/java/org/flowant/website/rest/ContentRest.java
@DeleteMapping(value = PATH_CONTENT + PATH_SEG_ID_CID)
    public Mono<ResponseEntity<Void>> deleteById(
            @PathVariable(value = ID) String id,
            @PathVariable(value = CID) String cid) {

        IdCid idCid = IdCid.of(id, cid);
        return repo.findById(idCid)
                .doOnNext(content-> FileStorage.deleteAll(content.getFileRefs()))
                .then(super.deleteById(idCid));
    }
// If File Server is separated, we can use FILES_DELETES end point instead of FileStorage.deleteAll
If File Server is separated, we can use FILES_DELETES end point instead of FileStorage.deleteAll
If File Server is separated we can use FILES_DELETES end point instead of FileStorage . deleteAll
@DeleteMapping(value = PATH_CONTENT + PATH_SEG_ID_CID)
    public Mono<ResponseEntity<Void>> deleteById(
            @PathVariable(value = ID) String id,
            @PathVariable(value = CID) String cid) {
        IdCid idCid = IdCid.of(id, cid);
        return repo.findById(idCid)
                .doOnNext(content-> FileStorage.deleteAll(content.getFileRefs()))
                .then(super.deleteById(idCid));
    }
@ DeleteMapping ( value = PATH_CONTENT + PATH_SEG_ID_CID ) public Mono < ResponseEntity < Void > > deleteById ( @ PathVariable ( value = ID ) String id , @ PathVariable ( value = CID ) String cid ) { IdCid idCid = IdCid . of ( id , cid ) ; return repo . findById ( idCid ) . doOnNext ( content -> FileStorage . deleteAll ( content . getFileRefs ( ) ) ) . then ( super . deleteById ( idCid ) ) ; }
If File Server is separated, we can use FILES_DELETES end point instead of FileStorage.deleteAll
If File Server is separated we can use FILES_DELETES end point instead of FileStorage . deleteAll