6

I'm trying to upload a file in grails. The generated scaffold is not working for me and giving me a 404 looking for 'save.jsp'

Domain

class Simple{
  byte [] avatar

  static constraints = {
    avatar nullable: true, maxSize: 1000000
  }
}

Controller

class SimpleController{
  def scaffold = Simple
  //or
  static scaffold = Simple
}

The issue has appeared previously and has been marked resolved here http://jira.grails.org/browse/GPSCAFFOLD-69, but I have the issue with grails 2.3.6 on mac OSX.

Am I missing something here?

Oliver Shaw
  • 4,390
  • 4
  • 22
  • 34
  • 1
    Not sure if this is the problem but scaffold should be defined as static `static scaffold = Simple` – Alidad Feb 24 '14 at 13:13
  • Hi, thanks @Alidad. Unfortunately that seems to boil down to the same problem. Oddly the file is being uploaded then displayed as an int array in the view rather than a file. – Oliver Shaw Feb 24 '14 at 13:32
  • 1
    I am unable to recreate the problem in Windows. It works flawlessly. Also checked in dbconsole that the data exists. – dmahapatro Mar 01 '14 at 00:02
  • Hi, thanks dmahapatro. I'll give it a whirl on a Linux and Windows to check it out. – Oliver Shaw Mar 01 '14 at 19:24
  • by any chance, did you upgrade to 2.3.6 from an earlier version? – aldrin Mar 05 '14 at 16:22

2 Answers2

0

try

static scaffold = true // instead of static scaffold = Simple
0

Scaffolding plugin is separate. Please make sure you are using the latest version in BuildConfig.groovy.

compile ":scaffolding:2.0.2"
Lari Hotari
  • 4,500
  • 28
  • 35