Hi there again,

Please keep discussions strictly on list - its the only way for everyone to
benefit from the conversation we have and interject where they feel they
want to. This means you get more input from more sources and doesn't mail
people directly (my personal preference).

If your interested in how one uploads a file in Lift, checkout the sample
application here: http://to.ly/jtz

Do you have any experience of developing with Java? Which would you rather,
save to database, or save to file? The impl is quite different for each.

Cheers, Tim

> On 13/07/2009 16:20, "kjetilge" <[email protected]> wrote:
> Thanks. Well, it helps, I've learned something new, but what would
> really be useful is a link or two to sample code showing how this is
> done in real life. I've just recently finished reading Programming in
> Scala and most of the Lift Book and I cant remember anything from this
> text that would directly help me with persisting an Array[Byte] to a
> database or as a file.
> 
> I guess I could use Scala.io or java.io for saving files perhaps ? But
> WHERE should the files go ? I come from Rails where finding out these
> things cost 30 sec googling. I must say that finding relevant
> tutorials and (working) sample code for basic tasks in Lift is very
> hard, even for a determined wannabe Lift developer like myself :-)
> 
> On 13/07/2009 14:39, "Timothy Perrett" <[email protected]> wrote:
> 
> Hi there,
> 
> Generally speaking, that's now how uploading in lift works - any given upload
> goes into a FileParamHolder object then you can persist it however you would
> like (filesystem, database etc) as your essentially left with Array[Byte]...
> 
> Does that help?
> 
> Cheers, Tim
> 
> On 13/07/2009 14:26, "kjetilge" <[email protected]> wrote:
> 
>> 
>> I'm a newbie and I'm having troble with finding a hint in the Liftbook
>> on how to set the path for an upload folder in Lift. In the manual
>> there is an example using a variable called tmpDir. Problem is, there
>> is no explanation for what the value of this variable should be. Apart
>> from that, I've at least managed to load an image in the browser after
>> defining a pictures folder in main/resources/toserve/pictures by
>> using:
>>         ResourceServer.allow {
>>             case "pictures" :: _ => true
>>         }
>> Then I can do: <img src="/classpath/pictures/sykkel.jpg" alt="Sykkel"/
>>> , and it works :-)
>> But when I set the value tmpDir="/classpath/pictures/" and try to
>> upload a file I get:
>> java.io.FileNotFoundException: /classpath/pictures/Lift Book.pdf
>> 
>> I'm obviously doing something terribly wrong. Does anybody know how to
>> do this ?
>> 
>> >> 
>> 



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to