Re: development Digest, Vol 119, Issue 6
Dayton Perkins <[email protected]> Tue, 27 Nov 2012 16:27:10 +0800
| Newsgroups | gmane.comp.php.drupal.devel |
|---|---|
| Message-ID | <[email protected]> |
On 11/27/2012 3:53 PM, [email protected] wrote: > Send development mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.drupal.org/mailman/listinfo/development > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of development digest..." > > > Today's Topics: > > 1. File upload and convert (Chris Miller) > 2. Ubercart problem (Dayton Perkins) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 26 Nov 2012 16:32:39 -0800 (PST) > From: Chris Miller <[email protected]> > Subject: [development] File upload and convert > To: [email protected], [email protected] > Message-ID: <[email protected]> > Content-Type: text/plain; charset="utf-8" > > Hi Folks, > > I have a content type with TWO file fields, in which I will designate TWO PDFs. On upload completion I want to run something like: "exec(pdftk f1.pdf background f2.pdf output f1.pdf)". This will "brand" f1.pdf. > > I don't see any standard mechanism and so I'm not sure how to go about this. I have a general understanding, but that doesn't answer the question. I am sure I don't want to intercept all possible uploads; just the uploads from this specific content type. So, can I define a file upload hook which is scoped to this specific content type? I haven't seen anything that makes me believe I can. Can I create a custom file field to use any time I need to perform a conversion? Can my custom file field "extend" the existing file field, so I don't have to port improvements/bugfixes to my custom file field version? > > So many questions... (-: > > Thanks for the help, > > Chris. > First look turns up this: Chris: though I have not done an implementation, seems likely... http://api.drupal.org/api/drupal/modules!field!field.api.php/function/hook_field_attach_submit/7 http://api.drupal.org/api/drupal/modules!field!field.attach.inc/group/field_attach/7 Let us know how it went. I have considered doing the same. -- /Kindest regards,/ /*Dayton Perkins*/ Dayton Perkins Good News Design Intelligent Web Programming for Business Dayton Perkins: Recent American Expat in Hong Kong [email protected] <mailto:[email protected]> [email protected] <mailto:[email protected]> Phone Me U.S Phone (rings me in HK) 616-795-9039 http://goodnewsdesign.com GND Logo <http://goodnewsdesign.com><http://goodnewsdesign.com>