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.
Chris, You’ll need something custom, at leeast that’s how I solved it I added an extra file field so people could upload the file, using hook_node_insert/hook_node_update I intercepted the upload, converted it, and store the result in the other file field. You could do it using a custom file field widget as well, just extend the current one (have a look at the image field widget, it extends the file widget) Cheers, Peter From: development-bounces@drupal.org [mailto:development-bounces@drupal.org] On Behalf Of Chris Miller Sent: dinsdag 27 november 2012 1:33 To: development@drupal.org; support@drupal.org Subject: [development] File upload and convert 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.
@earnie Please stop telling developers discussing development to use the support list. This list was started as "a list for Drupal developers".... http://web.archive.org/web/20110522011442/http://drupal.org/mailing-lists At some point the description of the list was changed to core development. Since core conversations rarely happen on this list, I'd like to see that changed back and limit suggestions to use the support list to questions about using Drupal or a specific module. - Kevin On Tue, Nov 27, 2012 at 7:11 AM, Aaron Winborn <winborn@advomatic.com>wrote:
You are looking for http://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook...
On 11/27/2012 3:38 AM, Peter Droogmans wrote:
Chris,****
** **
You’ll need something custom, at leeast that’s how I solved it****
** **
I added an extra file field so people could upload the file, using hook_node_insert/hook_node_update I intercepted the upload, converted it, and store the result in the other file field.****
** **
You could do it using a custom file field widget as well, just extend the current one (have a look at the image field widget, it extends the file widget)****
** **
Cheers,****
Peter****
** **
** **
*From:* development-bounces@drupal.org [ mailto:development-bounces@drupal.org <development-bounces@drupal.org>] *On Behalf Of *Chris Miller *Sent:* dinsdag 27 november 2012 1:33 *To:* development@drupal.org; support@drupal.org *Subject:* [development] File upload and convert****
** **
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.****
The OP cross posted to both support and development lists. There is an issue open for the description changes but I don't have the # handy. However, when in doubt use support and not development. Earnie On Tue, Nov 27, 2012 at 10:57 AM, Kevin Reynen <kreynen@gmail.com> wrote:
@earnie Please stop telling developers discussing development to use the support list. This list was started as "a list for Drupal developers"....
http://web.archive.org/web/20110522011442/http://drupal.org/mailing-lists
At some point the description of the list was changed to core development. Since core conversations rarely happen on this list, I'd like to see that changed back and limit suggestions to use the support list to questions about using Drupal or a specific module.
- Kevin
On Tue, Nov 27, 2012 at 7:11 AM, Aaron Winborn <winborn@advomatic.com> wrote:
You are looking for http://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook...
On 11/27/2012 3:38 AM, Peter Droogmans wrote:
Chris,
You’ll need something custom, at leeast that’s how I solved it
I added an extra file field so people could upload the file, using hook_node_insert/hook_node_update I intercepted the upload, converted it, and store the result in the other file field.
You could do it using a custom file field widget as well, just extend the current one (have a look at the image field widget, it extends the file widget)
Cheers,
Peter
From: development-bounces@drupal.org [mailto:development-bounces@drupal.org] On Behalf Of Chris Miller Sent: dinsdag 27 november 2012 1:33 To: development@drupal.org; support@drupal.org Subject: [development] File upload and convert
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.
-- Earnie -- https://sites.google.com/site/earnieboyd
Here's the issue, which has set dormant for over a year: http://drupal.org/node/1163962 Jamie Holly http://www.intoxination.net http://www.hollyit.net On 11/27/2012 11:33 AM, Earnie Boyd wrote:
The OP cross posted to both support and development lists. There is an issue open for the description changes but I don't have the # handy. However, when in doubt use support and not development.
Earnie
On Tue, Nov 27, 2012 at 10:57 AM, Kevin Reynen <kreynen@gmail.com> wrote:
@earnie Please stop telling developers discussing development to use the support list. This list was started as "a list for Drupal developers"....
http://web.archive.org/web/20110522011442/http://drupal.org/mailing-lists
At some point the description of the list was changed to core development. Since core conversations rarely happen on this list, I'd like to see that changed back and limit suggestions to use the support list to questions about using Drupal or a specific module.
- Kevin
On Tue, Nov 27, 2012 at 7:11 AM, Aaron Winborn <winborn@advomatic.com> wrote:
You are looking for http://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook...
On 11/27/2012 3:38 AM, Peter Droogmans wrote:
Chris,
You’ll need something custom, at leeast that’s how I solved it
I added an extra file field so people could upload the file, using hook_node_insert/hook_node_update I intercepted the upload, converted it, and store the result in the other file field.
You could do it using a custom file field widget as well, just extend the current one (have a look at the image field widget, it extends the file widget)
Cheers,
Peter
From: development-bounces@drupal.org [mailto:development-bounces@drupal.org] On Behalf Of Chris Miller Sent: dinsdag 27 november 2012 1:33 To: development@drupal.org; support@drupal.org Subject: [development] File upload and convert
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.
On 28/11/12 00:33, Earnie Boyd wrote:
The OP cross posted to both support and development lists. There is an issue open for the description changes but I don't have the # handy. However, when in doubt use support and not development.
E
The poster is talking about developing code. If anything, that's OT for the support list, where I would expect questions such as "What module should I use for .... " and "What should I read?" and I "I have done this and that, and it still doesn't work. how might I proceed?" The current description for the develop list is wrong since the core developers decided they didn't even know why they would use a mailing list all all and decided to use other means to discuss their affairs. The current description for the develop list as changed after I joined it. I am not happy about that, because there is no alternative list that seems good for people who want to know about drupal code (core, modules, whatever) and maybe write some of their own. Whenever you feel the urge to tell people they are in the wrong place, treat them as a friend: explain to them why it is good for them to be in the other place. And, if you can, provide some kind of answer too. If you can't do those things, say nothing, because there is nothing so unwelcoming as an unfriendly response, and I have seen some here. Specifically who seemed unfriendly, I don't recall.
Thank you for the suggestions folks. I still haven't managed to achieve what I want to do within the Drupal framework. I know the failing is mine, not the platform. However, since my deadline is fast approaching and I already know how I can cludge together a solution that will work but will not be making use of the Drupal Multilingual frame work I am going to go that route and hope to rework the module at a later date to do things right. Thank you to everyone who tried to help me. -----Original Message----- From: development-bounces@drupal.org [mailto:development-bounces@drupal.org] On Behalf Of John Summerfield Sent: April 3, 2013 10:54 PM To: development@drupal.org Subject: Re: [development] File upload and convert On 28/11/12 00:33, Earnie Boyd wrote:
The OP cross posted to both support and development lists. There is an issue open for the description changes but I don't have the # handy. However, when in doubt use support and not development.
E
The poster is talking about developing code. If anything, that's OT for the support list, where I would expect questions such as "What module should I use for .... " and "What should I read?" and I "I have done this and that, and it still doesn't work. how might I proceed?" The current description for the develop list is wrong since the core developers decided they didn't even know why they would use a mailing list all all and decided to use other means to discuss their affairs. The current description for the develop list as changed after I joined it. I am not happy about that, because there is no alternative list that seems good for people who want to know about drupal code (core, modules, whatever) and maybe write some of their own. Whenever you feel the urge to tell people they are in the wrong place, treat them as a friend: explain to them why it is good for them to be in the other place. And, if you can, provide some kind of answer too. If you can't do those things, say nothing, because there is nothing so unwelcoming as an unfriendly response, and I have seen some here. Specifically who seemed unfriendly, I don't recall.
Thanks Too!!Katerina
From: RHJeffreys@emcoltd.com To: development@drupal.org Date: Thu, 4 Apr 2013 12:45:16 +0000 Subject: Re: [development] File upload and convert
Thank you for the suggestions folks.
I still haven't managed to achieve what I want to do within the Drupal framework. I know the failing is mine, not the platform. However, since my deadline is fast approaching and I already know how I can cludge together a solution that will work but will not be making use of the Drupal Multilingual frame work I am going to go that route and hope to rework the module at a later date to do things right.
Thank you to everyone who tried to help me.
-----Original Message----- From: development-bounces@drupal.org [mailto:development-bounces@drupal.org] On Behalf Of John Summerfield Sent: April 3, 2013 10:54 PM To: development@drupal.org Subject: Re: [development] File upload and convert
On 28/11/12 00:33, Earnie Boyd wrote:
The OP cross posted to both support and development lists. There is an issue open for the description changes but I don't have the # handy. However, when in doubt use support and not development.
E
The poster is talking about developing code. If anything, that's OT for the support list, where I would expect questions such as "What module should I use for .... " and "What should I read?" and I "I have done this and that, and it still doesn't work. how might I proceed?"
The current description for the develop list is wrong since the core developers decided they didn't even know why they would use a mailing list all all and decided to use other means to discuss their affairs.
The current description for the develop list as changed after I joined it. I am not happy about that, because there is no alternative list that seems good for people who want to know about drupal code (core, modules, whatever) and maybe write some of their own.
Whenever you feel the urge to tell people they are in the wrong place, treat them as a friend: explain to them why it is good for them to be in the other place. And, if you can, provide some kind of answer too.
If you can't do those things, say nothing, because there is nothing so unwelcoming as an unfriendly response, and I have seen some here. Specifically who seemed unfriendly, I don't recall.
Consensus::Crap …it's crap. Read no more About it. Stop wasting your time upon irrelevant technology. On Nov 27, 2012, at 7:57 AM, Kevin Reynen <kreynen@gmail.com> wrote:
@earnie Please stop telling developers discussing development to use the support list. This list was started as "a list for Drupal developers"....
http://web.archive.org/web/20110522011442/http://drupal.org/mailing-lists
At some point the description of the list was changed to core development. Since core conversations rarely happen on this list, I'd like to see that changed back and limit suggestions to use the support list to questions about using Drupal or a specific module.
- Kevin
On Tue, Nov 27, 2012 at 7:11 AM, Aaron Winborn <winborn@advomatic.com> wrote: You are looking for http://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook...
On 11/27/2012 3:38 AM, Peter Droogmans wrote:
Chris,
You’ll need something custom, at leeast that’s how I solved it
I added an extra file field so people could upload the file, using hook_node_insert/hook_node_update I intercepted the upload, converted it, and store the result in the other file field.
You could do it using a custom file field widget as well, just extend the current one (have a look at the image field widget, it extends the file widget)
Cheers,
Peter
From: development-bounces@drupal.org [mailto:development-bounces@drupal.org] On Behalf Of Chris Miller Sent: dinsdag 27 november 2012 1:33 To: development@drupal.org; support@drupal.org Subject: [development] File upload and convert
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.
Op 3 apr. 2013, om 00:51 heeft Mark Symonds <mark@syminet.com> het volgende geschreven:
Consensus::Crap
…it's crap. Read no more About it. Stop wasting your time upon irrelevant technology.
On Nov 27, 2012, at 7:57 AM, Kevin Reynen <kreynen@gmail.com> wrote:
@earnie Please stop telling developers discussing development to use the support list. This list was started as "a list for Drupal developers"....
http://web.archive.org/web/20110522011442/http://drupal.org/mailing-lists
At some point the description of the list was changed to core development. Since core conversations rarely happen on this list, I'd like to see that changed back and limit suggestions to use the support list to questions about using Drupal or a specific module.
- Kevin
On Tue, Nov 27, 2012 at 7:11 AM, Aaron Winborn <winborn@advomatic.com> wrote: You are looking for http://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook...
On 11/27/2012 3:38 AM, Peter Droogmans wrote:
Chris,
You’ll need something custom, at leeast that’s how I solved it
I added an extra file field so people could upload the file, using hook_node_insert/hook_node_update I intercepted the upload, converted it, and store the result in the other file field.
You could do it using a custom file field widget as well, just extend the current one (have a look at the image field widget, it extends the file widget)
Cheers,
Peter
From: development-bounces@drupal.org [mailto:development-bounces@drupal.org] On Behalf Of Chris Miller Sent: dinsdag 27 november 2012 1:33 To: development@drupal.org; support@drupal.org Subject: [development] File upload and convert
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.
From: "Peter Droogmans" <Peter@attiks.com> To: development@drupal.org, support@drupal.org Sent: Tuesday, November 27, 2012 12:38:57 AM Subject: Re: [development] File upload and convert
<SNIP>
You could do it using a custom file field widget as well, just extend the current one ( have a look at the image field widget, it extends the file widget )
Cheers,
Peter
Hi Peter, Thanks very much. This one tiny bit of advice is exactly the assistance I needed. Give yourself a raise. I was trying to understand if "file" needs to know about "image" for the extension, or if "image" can simply extend without the knowledge or cooperation of "file". This interaction is pretty central to Drupal (Earnie!) and I have not yet found the Rosetta stone. W hile investigating this I discovered that there are upload validation functions. "Upload validation" is precisely what I want to do: provisionally accept a file for upload, perform some operation and continue or abort, depending on the outcome of the operation. Further, I can enable/disable a particular conversion with a checkbox in the standard dialog. It looks to me, with my untrained and novice enthusiasm, that almost everything is already in place. This is beginning to look like a contributed module "Conversions", which would please me greatly, if I can learn enough about how this works to do it. So, the natural question is, is "upload validations" an extensible set? Where can I investigate this more fully? Thanks for the help, Chris.
Please use the support@drupal.org for this and do not cross post to both. If you're unsure of which to use always choose support. Earnie On Mon, Nov 26, 2012 at 7:32 PM, Chris Miller <cjm@tryx.org> wrote:
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.
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Earnie -- https://sites.google.com/site/earnieboyd
participants (11)
-
Aaron Winborn -
Chris Miller -
Earnie Boyd -
Jamie Holly -
John Summerfield -
Kevin Reynen -
Mark Symonds -
Peter Droogmans -
Richard Jeffreys -
Stefan Nagtegaal -
Αικατερίνη Κατωπόδη