diff --git a/curriculumsearch/curriculumsearch-0.0.1-SNAPSHOT.jar b/curriculumsearch/curriculumsearch-0.0.1-SNAPSHOT.jar index 8ad1048..a2a88b3 100644 Binary files a/curriculumsearch/curriculumsearch-0.0.1-SNAPSHOT.jar and b/curriculumsearch/curriculumsearch-0.0.1-SNAPSHOT.jar differ diff --git a/curriculumsearch/src/main/java/com/roshka/ResourceConfig.java b/curriculumsearch/src/main/java/com/roshka/ResourceConfig.java index 1126bab..5733b8b 100644 --- a/curriculumsearch/src/main/java/com/roshka/ResourceConfig.java +++ b/curriculumsearch/src/main/java/com/roshka/ResourceConfig.java @@ -8,6 +8,6 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter public class ResourceConfig extends WebMvcConfigurerAdapter { @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { - registry.addResourceHandler("/images/**").addResourceLocations("file:images/"); + registry.addResourceHandler("/uploadsBirthday/**").addResourceLocations("file:./uploadsBirthday/"); } } diff --git a/curriculumsearch/src/main/java/com/roshka/controller/BirthdayController.java b/curriculumsearch/src/main/java/com/roshka/controller/BirthdayController.java index f42e2a1..f2c2cc7 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/BirthdayController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/BirthdayController.java @@ -96,7 +96,7 @@ public class BirthdayController { Path rutaCompleta = Paths.get(rutaAbsoluta); Files.write(rutaCompleta, bytesImg); // Si todo sale bien, guarda la foto en la base de datos - birthday.setFoto("http://192.168.16.90:8888/uploadsBirthday/" + DigestUtils.md5Hex(originalFilename) + "." + fileExtension); + birthday.setFoto("uploadsBirthday/" + DigestUtils.md5Hex(originalFilename) + "." + fileExtension); } catch (IOException e) { throw new RuntimeException(e); } diff --git a/curriculumsearch/uploadsBirthday/953eb5b45c1790b4ea9fa236e8fb0892.jpg b/curriculumsearch/uploadsBirthday/953eb5b45c1790b4ea9fa236e8fb0892.jpg new file mode 100644 index 0000000..00ff925 Binary files /dev/null and b/curriculumsearch/uploadsBirthday/953eb5b45c1790b4ea9fa236e8fb0892.jpg differ