public static void upload(File file, String assetName) {
new Asset(file,assetName).save()
}
and in Asset:
public Asset(File file, String assetName) {
this.fileName = file.getName();
this.file.set(file, contentType);
}
2011/1/4 Ólafur Gauti Guðmundsson <oli....@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>
--
Guillaume Bort, http://guillaume.bort.fr
For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com
Then you should probably be able to write:
File f = params.get("asset.file", File.class);
2011/1/5 Ólafur Gauti Guðmundsson <oli....@gmail.com>:
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>
--
Guillaume Bort, http://guillaume.bort.fr
For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com