|
|
@ -69,15 +69,12 @@ public class GatesController { |
|
|
|
Document doc = new Document(); |
|
|
|
Document doc = new Document(); |
|
|
|
doc.setName(file.getOriginalFilename()); |
|
|
|
doc.setName(file.getOriginalFilename()); |
|
|
|
doc.setSize(file.getSize()); |
|
|
|
doc.setSize(file.getSize()); |
|
|
|
/** |
|
|
|
|
|
|
|
* Hfcibhtybt |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
Optional<String> ext = Optional.ofNullable(file.getOriginalFilename()) |
|
|
|
Optional<String> ext = Optional.ofNullable(file.getOriginalFilename()) |
|
|
|
.filter(f -> f.contains(".")) |
|
|
|
.filter(f -> f.contains(".")) |
|
|
|
.map(f -> f.substring(file.getOriginalFilename().lastIndexOf(".") + 1)); |
|
|
|
.map(f -> f.substring(file.getOriginalFilename().lastIndexOf(".") + 1)); |
|
|
|
doc.setExtension(ext.get()); |
|
|
|
doc.setExtension(ext.get()); |
|
|
|
doc.setExtension( ext.get()); |
|
|
|
doc.setExtension( ext.get()); |
|
|
|
// doc.setPath();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
doc = client.post() |
|
|
|
doc = client.post() |
|
|
|
.uri("http://resource-service-api:8181/storage-entry/create") |
|
|
|
.uri("http://resource-service-api:8181/storage-entry/create") |
|
|
|