File Upload example code

View: New views
8 Messages — Rating Filter:   Alert me  

File Upload example code

by Praveen Ray-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I extended the file upload example given on the yaws site with few more options. Hopefully, it'll be useful for others. Details are here:


-Praveen

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@...
https://lists.sourceforge.net/lists/listinfo/erlyaws-list

Re: File Upload example code

by Steve Vinoski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Sun, Sep 20, 2009 at 9:32 PM, Praveen Ray <praveenray@...> wrote:
I extended the file upload example given on the yaws site with few more options. Hopefully, it'll be useful for others. Details are here:



Got a patch? Send it along!

--steve 

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@...
https://lists.sourceforge.net/lists/listinfo/erlyaws-list

Re: File Upload example code

by Claes Wikström :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Steve Vinoski wrote:

>
>
> On Sun, Sep 20, 2009 at 9:32 PM, Praveen Ray <praveenray@...
> <mailto:praveenray@...>> wrote:
>
>     I extended the file upload example
>     <http://yaws.hyber.org/code.yaws?file=/upload.yaws> given on the
>     yaws site with few more options. Hopefully, it'll be useful for
>     others. Details are here:
>
>     http://blogs.yellowfish.biz/2009/yaws-and-file-upload/
>
>
>
> Got a patch? Send it along!

Nice code, do you want me to integrate the code into Yaws?
Optimal though - would be an applicable patch.

/klacke

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@...
https://lists.sourceforge.net/lists/listinfo/erlyaws-list

Parent Message unknown Fwd: File Upload example code

by Praveen Ray-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


thanks. I'd love to create a patch if someone gives me pointers on how to do it. Start from stable codebase or the git head? 
-Praveen


On Tue, Sep 22, 2009 at 3:42 PM, Claes Wikstrom <klacke@...> wrote:
Steve Vinoski wrote:


On Sun, Sep 20, 2009 at 9:32 PM, Praveen Ray <praveenray@... <mailto:praveenray@...>> wrote:

   I extended the file upload example
   <http://yaws.hyber.org/code.yaws?file=/upload.yaws> given on the

   yaws site with few more options. Hopefully, it'll be useful for
   others. Details are here:

   http://blogs.yellowfish.biz/2009/yaws-and-file-upload/



Got a patch? Send it along!

Nice code, do you want me to integrate the code into Yaws?
Optimal though - would be an applicable patch.

/klacke



--
-PR



--
-PR

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@...
https://lists.sourceforge.net/lists/listinfo/erlyaws-list

Re: Fwd: File Upload example code

by Claes Wikström :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Praveen Ray wrote:
>
> thanks. I'd love to create a patch if someone gives me pointers on how
> to do it. Start from stable codebase or the git head?

git head

/klacke

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@...
https://lists.sourceforge.net/lists/listinfo/erlyaws-list

Parent Message unknown Re: Fwd: File Upload example code

by Praveen Ray-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Steve, Klacke
Since this is a new module, I've attached it with this email. Nothing changes in the yaws code - the userland is supposed to call this module to read the incoming data if multipart/form is submitted.  So, there is no patch file really. Please suggest better ways of doing this.
I just realized the code uses Andrew Kreiling's uuid module to create unique file names..what's the recommended way to generate temp files in erlang? 

thanks

On Wed, Sep 23, 2009 at 8:40 AM, Steve Vinoski <vinoski@...> wrote:


2009/9/23 Claes Wikström <klacke@...>

Praveen Ray wrote:
>
> thanks. I'd love to create a patch if someone gives me pointers on how
> to do it. Start from stable codebase or the git head?

git head

As Klacke says, Praveen, start from a fresh git pull. After that, make your changes, then just run:

git diff

in the top dir of your yaws git tree, and it'll generate a patch file that you can send along to us.

--steve



--
-PR


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@...
https://lists.sourceforge.net/lists/listinfo/erlyaws-list

yaws-multipart.zip (5K) Download Attachment

Re: Fwd: File Upload example code

by Olivier Girondel-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Sep 24, 2009 at 5:36 AM, Praveen Ray <praveenray@...> wrote:
> I just realized the code uses Andrew Kreiling's uuid module to create unique
> file names..what's the recommended way to generate temp files in erlang?

About UUIDs, I have (quite old, but) http://erlang.biniou.org/erluuid/

--
Olivier

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@...
https://lists.sourceforge.net/lists/listinfo/erlyaws-list

Re: Fwd: File Upload example code

by chandru-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/9/24 Praveen Ray <praveenray@...>
Hi Steve, Klacke
Since this is a new module, I've attached it with this email. Nothing changes in the yaws code - the userland is supposed to call this module to read the incoming data if multipart/form is submitted.  So, there is no patch file really. Please suggest better ways of doing this.
I just realized the code uses Andrew Kreiling's uuid module to create unique file names..what's the recommended way to generate temp files in erlang? 

I usually do something like this:

make_tmp_file_name() ->
    {A, B, C} = now(),
    "Some_prefix_"++ integer_to_list(A) ++ "_" ++ integer_to_list(B) ++ "_" ++ integer_to_list(C).

cheers
Chandru


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@...
https://lists.sourceforge.net/lists/listinfo/erlyaws-list