|
17 | 17 | import java.util.Set; |
18 | 18 | import java.util.UUID; |
19 | 19 | import java.util.regex.Pattern; |
20 | | - |
21 | 20 | import org.geotools.api.data.Query; |
22 | 21 | import org.geotools.api.data.SimpleFeatureSource; |
23 | 22 | import org.geotools.api.filter.Filter; |
|
36 | 35 | import org.springframework.web.bind.annotation.GetMapping; |
37 | 36 | import org.springframework.web.bind.annotation.ModelAttribute; |
38 | 37 | import org.springframework.web.bind.annotation.PathVariable; |
39 | | -import org.springframework.web.bind.annotation.PutMapping; |
| 38 | +import org.springframework.web.bind.annotation.PostMapping; |
40 | 39 | import org.springframework.web.bind.annotation.RequestPart; |
41 | 40 | import org.springframework.web.server.ResponseStatusException; |
42 | 41 | import org.tailormap.api.annotation.AppRestController; |
@@ -79,7 +78,7 @@ public AttachmentsController(EditUtil editUtil, FeatureSourceFactoryHelper featu |
79 | 78 | * @param fileData the attachment file data |
80 | 79 | * @return the response entity |
81 | 80 | */ |
82 | | - @PutMapping( |
| 81 | + @PostMapping( |
83 | 82 | path = { |
84 | 83 | "${tailormap-api.base-path}/{viewerKind}/{viewerName}/layer/{appLayerId}/feature/{featureId}/attachments" |
85 | 84 | }, |
@@ -151,7 +150,8 @@ public ResponseEntity<Serializable> addAttachment( |
151 | 150 | * @return true if the file's extension or MIME type matches one of the accepted types, false otherwise |
152 | 151 | */ |
153 | 152 | private static boolean validateMimeTypeAccept(String acceptList, String fileName, String mimeType) { |
154 | | - Iterable<String> allowedMimeTypes = Splitter.on(Pattern.compile(",\\s*")).split(acceptList); |
| 153 | + Iterable<String> allowedMimeTypes = |
| 154 | + Splitter.on(Pattern.compile(",\\s*")).split(acceptList); |
155 | 155 | final Locale locale = Locale.ENGLISH; |
156 | 156 | for (String allowedType : allowedMimeTypes) { |
157 | 157 | if (allowedType.startsWith(".")) { |
|
0 commit comments