Skip to content

Commit

Permalink
fix file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
kamenitxan committed Sep 1, 2023
1 parent 7344859 commit d823f9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import sbtassembly.AssemblyPlugin.autoImport.assembly

val V = new {
val Scala = "3.3.1-RC4"
val jakon = "0.5.7"
val jakon = "0.5.8-SNAPSHOT"
val spark = "2.9.4-jakon-3"
val log4j = "2.20.0"
val circeVersion = "0.14.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ object PageletInitializer {
// TODO: vytvoreni conn pouze pokud je potreba
DBHelper.withDbConnection(conn => {
val dataClass = getDataClass(m)
if (req.raw().getContentType.startsWith("multipart/form-data")) {
req.attribute("org.eclipse.jetty.multipartConfig", new MultipartConfigElement("/temp"))
}
if (post.validate() && dataClass.isDefined) {
if (req.raw().getContentType.startsWith("multipart/form-data")) {
req.attribute("org.eclipse.jetty.multipartConfig", new MultipartConfigElement("/temp"))
}
val formData = EntityValidator.createFormData(req, dataClass.get)
EntityValidator.validate(dataClass.get.getSimpleName, formData) match {
case Left(result) =>
Expand Down

0 comments on commit d823f9a

Please sign in to comment.