<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>Op 3 apr. 2013, om 00:51 heeft Mark Symonds &lt;<a href="mailto:mark@syminet.com">mark@syminet.com</a>&gt; het volgende geschreven:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Consensus::Crap &nbsp;</div><div><br></div><div>…it's crap. &nbsp;Read no more About it. &nbsp;&nbsp;</div><div>Stop wasting your time upon irrelevant technology. &nbsp;</div>
<br><div><div>On Nov 27, 2012, at 7:57 AM, Kevin Reynen &lt;<a href="mailto:kreynen@gmail.com">kreynen@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br>@earnie Please stop telling developers discussing development to use the support list.&nbsp; This list was started as "a list for Drupal developers"....<br><br><a href="http://web.archive.org/web/20110522011442/http://drupal.org/mailing-lists">http://web.archive.org/web/20110522011442/http://drupal.org/mailing-lists</a><br>
<br>At some point the description of the list was changed to core development.&nbsp; 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&nbsp; specific module. <br>
<br>- Kevin<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 27, 2012 at 7:11 AM, Aaron Winborn <span dir="ltr">&lt;<a href="mailto:winborn@advomatic.com" target="_blank">winborn@advomatic.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>You are looking for
<a href="http://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_file_insert/7" target="_blank">http://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_file_insert/7</a><div><div class="h5">
<br>
      <br>
      On 11/27/2012 3:38 AM, Peter Droogmans wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      
      
      
      <div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">Chris,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"><u></u>&nbsp;<u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">You’ll need something custom, at leeast that’s
            how I solved it<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"><u></u>&nbsp;<u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">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.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"><u></u>&nbsp;<u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">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)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"><u></u>&nbsp;<u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">Cheers,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">Peter<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"><u></u>&nbsp;<u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"><u></u>&nbsp;<u></u></span></p>
        <div>
          <div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;" lang="EN-US"> <a href="mailto:development-bounces@drupal.org" target="_blank">development-bounces@drupal.org</a>
                [<a href="mailto:development-bounces@drupal.org" target="_blank">mailto:development-bounces@drupal.org</a>] <b>On Behalf Of
                </b>Chris Miller<br>
                <b>Sent:</b> dinsdag 27 november 2012 1:33<br>
                <b>To:</b> <a href="mailto:development@drupal.org" target="_blank">development@drupal.org</a>; <a href="mailto:support@drupal.org" target="_blank">support@drupal.org</a><br>
                <b>Subject:</b> [development] File upload and convert<u></u><u></u></span></p>
          </div>
        </div><p class="MsoNormal"><u></u>&nbsp;<u></u></p>
        <div>
          <div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Hi
                Folks,<u></u><u></u></span></p>
          </div>
          <div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"><u></u>&nbsp;<u></u></span></p>
          </div>
          <div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">I
                have a content type with TWO file fields, in which I
                will designate TWO PDFs. &nbsp;On upload completion I want to
                run something like: "exec(pdftk f1.pdf background f2.pdf
                output f1.pdf)". &nbsp;This will "brand" f1.pdf.<u></u><u></u></span></p>
          </div>
          <div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"><u></u>&nbsp;<u></u></span></p>
          </div>
          <div>
            <div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">I
                  don't see any standard mechanism and so I'm not sure
                  how to go about this. &nbsp;I have a general understanding,
                  but that doesn't answer the question. &nbsp;I am sure I
                  don't want to intercept all possible uploads; just the
                  uploads from this specific content type. &nbsp;So, can I
                  define a file upload hook which is scoped to this
                  specific content type? &nbsp;I haven't seen anything that
                  makes me believe I can. &nbsp;Can I create a custom file
                  field to use any time I need to perform a conversion?
                  &nbsp;Can my custom file field "extend" the existing file
                  field, so I don't have to port&nbsp;improvements/bugfixes
                  to my custom file field version?<u></u><u></u></span></p>
            </div>
            <div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"><u></u>&nbsp;<u></u></span></p>
            </div>
            <div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">So
                  many questions... &nbsp;(-:<u></u><u></u></span></p>
            </div>
            <div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"><u></u>&nbsp;<u></u></span></p>
            </div>
            <div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Thanks
                  for the help,<u></u><u></u></span></p>
            </div>
            <div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"><u></u>&nbsp;<u></u></span></p>
            </div>
            <div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Chris.<u></u><u></u></span></p>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div>
</blockquote></div><br></div></blockquote></div><br></body></html>