How upload attachment to CouchDB with JS

1,008 views
Skip to first unread message

faust45

unread,
May 8, 2010, 12:39:49 PM5/8/10
to CouchApp
Can any one help?

--
You received this message because you are subscribed to the Google Groups "CouchApp" group.
To post to this group, send email to couc...@googlegroups.com.
To unsubscribe from this group, send email to couchapp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/couchapp?hl=en.

Benoit Chesneau

unread,
May 9, 2010, 12:09:07 PM5/9/10
to CouchApp


On May 8, 6:39 pm, faust45 <faust...@gmail.com> wrote:
> Can any one help?
>
Could you describe the use case ?

- benoît

faust45

unread,
May 10, 2010, 5:45:51 AM5/10/10
to CouchApp
Now it's working fine.

jan____ told me about custom form handler in couch,
and i looked in futon source and find example with uploading
attachments.

ewillyb

unread,
Jun 28, 2010, 4:17:18 PM6/28/10
to CouchApp
Hello,

I have the same question.
Use case:
- Doc already exists in couchdb
- From browser, open file dialog, browse to file and upload
- Doc should be added to _attachments field of existing doc

Faust -- you said you figured out the solution. Care to assist me?
I've seen a half implementation by japh(r) using templates.js which is
no longer used in latest version of couchapp which now uses mustache.

I cannot seem to figure out all the js dependencies that need to be
included and how to include them.

Any help would be GREATLY appreciated.

~ E Willy B

Joshua

unread,
Jul 2, 2010, 1:07:20 AM7/2/10
to CouchApp
Hello,

TapirWiki does this with its attachments functionality. You could try
having a look at that:

http://code.google.com/p/tapirwiki/

J Chris Anderson

unread,
Jul 2, 2010, 2:54:41 AM7/2/10
to couc...@googlegroups.com

On Jun 28, 2010, at 1:17 PM, ewillyb wrote:

> Hello,
>
> I have the same question.
> Use case:
> - Doc already exists in couchdb
> - From browser, open file dialog, browse to file and upload
> - Doc should be added to _attachments field of existing doc
>

There is also an example of this here in this branch of my basic CouchApp template:

http://github.com/jchris/proto/tree/photo

Or a video about doing it here:

http://www.youtube.com/watch?v=Xk5gaUURdJI

let us know how it goes. especially blog posts or any writeups of your experience are helpful.

Chris

Goog Jobs

unread,
May 12, 2012, 7:02:52 AM5/12/12
to couc...@googlegroups.com
Hi,  Joshua ! Twiki seems  using the ajaxform() , how to use a  $couch.db.saveDoc()?
 
在 2010年7月2日星期五UTC+8下午1时07分20秒,Joshua写道:
> > > To unsubscribe from this group, send email to couchapp+unsubscribe@googlegroups.com.
> > > For more options, visit this group athttp://groups.google.com/group/couchapp?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups "CouchApp" group.
> > To post to this group, send email to couc...@googlegroups.com.
> > To unsubscribe from this group, send email to couchapp+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages