Coded something up in Couch in an interesting way? Have a snippet or shortcode to share? Post it here for the community to benefit.
45 posts Page 2 of 5
Any progress on this?
Is there anything I could help with?
Thanks but I'll need some time with this.
Can this be solved without rewriting native Couch code?
Coding it in native Couch code was never the intention - we'll have to use PHP.

For anyone wishing to have a stab at it, 'couch/uploader.php' (used by plupload for gallery) and 'couch/addons/data-bound-form/securefile.php should prove useful as a rough guide.
KK wrote: Coding it in native Couch code was never the intention - we'll have to use PHP.

For anyone wishing to have a stab at it, 'couch/uploader.php' (used by plupload for gallery) and 'couch/addons/data-bound-form/securefile.php should prove useful as a rough guide.


No, my question is about 'native' couch code - which meant native php code Couch is written with. Sorry for mislabelling :D
So, again, can it be done without any changes to shipped codebase?
can it be done without any changes to shipped codebase?
With the shipped codebase, we only have securefile for uploads from the frontend (which is what the issue is all about).

We'll need to create something new adapting the existing code to handle the use-case in question. Plupload used by gallery module seems to be the most likely candidate to use as a base.
Why would it require to "create something new"? Securefile is just perfect for us.

I'd rather suggest to make such 'easy' routine possible:

A template has supposedly 1 securefile editable field. To handle multi-upload it is required to have mode='create' for databound form. Regular <input multiple> must have a f_name of bound field (+hidden <cms:input type='bound' />)

Now the salt: For each submitted file of total count($_FILES) some php code performs <cms:db_persist_form _auto_title='1' />. This should be possible with some little modification, as I sense it. Am I woefully wrong?

That's it - just repeat this 'saving-persisting' as many times as many files were submitted. After each success, we could handle other tasks with knowing k_last_insert_id.

Is this realistic? It will solve the request.
UP
Ok, this is fixed now (with cURL). :D :D :D :lol:

Some time later I will post a tutorial if anyone also wants to use "multiple" inputs for files. Since this is done from front-end, the solution was required to use 'securefiles' editables.
trendoman wrote: Ok, this is fixed now (with cURL). :D :D :D :lol:

Some time later I will post a tutorial if anyone also wants to use "multiple" inputs for files. Since this is done from front-end, the solution was required to use 'securefiles' editables.


Take your time mate! I will wait :)
As soon as possible!

Touch me up : abada[dot]zulma[at]gmail[dot]com
45 posts Page 2 of 5
cron