Add a D7 version.

To start with, just implement a new element #type = "plupload" and have it behave pretty similarly to #type = 'file' just handle an upload with no bells or whistles. Also, write a callback to demonstrate it.

We could also do something like:

$form['myfile'] = array(
'#type' => 'file',
'#multiple' => TRUE,
);

and respond to that, but for now, just making a new element to KISS.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JacobSingh’s picture

Status: Active » Needs review
FileSize
21.02 KB
pwolanin’s picture

FileSize
13.54 KB

Looks like Jacob already committed the above to CVS.

Here's a follow-on patch that's mostly the work of effulgensia.

effulgentsia’s picture

subscribe :)

pwolanin’s picture

FileSize
14.68 KB

based on http://www.plupload.com/punbb/viewtopic.php?pid=92#p92 and testing, it seems like session cookies do work with flash.

This patch adds flash back and adds a URL token.

pwolanin’s picture

FileSize
14.68 KB

reordered the runtimes.

JacobSingh’s picture

Status: Needs review » Fixed
FileSize
14.41 KB

This patch by @efflugentsia and @pwolanin adds validators mainly, and encompasses pwolanin's patches above.

Committed to D7 and closing for now. New bugs and features in new issues. This has been tested by Acquia's QA team in multiple browsers / OSs

pwolanin’s picture

Status: Fixed » Needs review
FileSize
2.64 KB

Quick follow-up to make sure the temp directory exists and to fix up the code style in the handle_upload function.

pwolanin’s picture

plus improved checking of the temp file name for security - we can't actually sanitize it, we just need to reject it if it's invalid.

effulgentsia’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Reviewed & tested by the community

Looks good. As per #6, once this is fixed, let's stop using this generic issue, and open new issues for specific features/bugs/tasks.

effulgentsia’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD.

effulgentsia’s picture

Committed this additional patch that fixes a token name conflict and temp directory variable bug.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit f724b6e on master, 7.x-2.x, 8.x-1.x by JacobSingh:
    #880288 added D7 version
    
    
  • Commit d7609cd on master, 7.x-2.x, 8.x-1.x by JacobSingh:
    #880288 by efflugentsia and pwolanin: polish on D7 version, validation
    
    
  • Commit fe4c218 on master, 7.x-2.x, 8.x-1.x by effulgentsia:
    [#880288-8]: Improved code style, security, and error handlind in...
  • Commit 84cf96d on master, 7.x-2.x, 8.x-1.x by effulgentsia:
    [#880288-11] Fixed token name conflict and incorrect directory being...