Эх сурвалжийг харах

Images: fileName experiments

Andrew Grant 2 сар өмнө
parent
commit
f5618d94f7

+ 2 - 0
src/main/java/scot/carricksoftware/grants/controllers/images/images/ImageFormControllerImpl.java

@@ -77,6 +77,8 @@ public class ImageFormControllerImpl implements ImageFormController {
         var z = imageCommand;
         var x = file;
         int debug = -1;
+        imageCommand.setFileName(file.getOriginalFilename());
+
         imageCommandValidator.validate(imageCommand, bindingResult);
 
 

+ 5 - 3
src/main/resources/templates/images/image/form.html

@@ -66,9 +66,11 @@
                 </td>
             </tr>
             <tr>
-                <td>File to upload:</td>
-                <td>
-                    <input type="file" name="file" />
+                <td  style="text-align: right;">
+                    <label for="file">File to upload :&nbsp;</label>
+                </td>
+                <td style="text-align: left;">
+                    <input type="file" name="file" id = "file"/>
                 </td>
             </tr>
             <tr>