Needs work
Project:
Plupload integration
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Aug 2012 at 15:11 UTC
Updated:
24 Jul 2013 at 10:58 UTC
Jump to comment: Most recent file
Comments
Comment #1
slashrsm commentedPlupload for D7 only provides form element that can be used by other modules. It does not create any nodes or similar.
If you need functionality similar to D6 you need to create a module that will depend on this one.
Comment #2
bulat commentedI understand that, and we have a custom module to create nodes for plupload files. What I am looking for is a hook (e.g. file_uploaded) that we could use to action file (put to a corresponding queue for example) as soon as it reaches the server. In our use case processing them in form_submit is not ideal.
Comment #3
slashrsm commentedCan you explain why is form_submit unsuitable for your needs?
Comment #4
bulat commentedWe expect users to load hundred of files (images) in one go. This takes from 30 min to few hours. Once process is complete it calls form_submit. In my view this has 2 drawbacks:
1. Users have to see stalling page while form_submit creates nodes (I guess this can be improved by queues).
2. We put unnecessary load on the server by processing all files in one call (creating nodes, image cache, moving them around etc.)
If we had a callback for each file both issues would be resolved. We had an experiment where our processing was injected into plupload_handle_uploads function. But it would be great to find a way to do this without hacking module's code.
Comment #5
slashrsm commentedWe could expose a hook, as you already suggested. Can you post a patch?
Comment #6
slashrsm commentedWe could expose a hook, as you already suggested. Can you post a patch?
Comment #7
bulat commentedI have added the hook file_uploaded. it has $fileinfo argument that contains temporary path and original name of the file.
Comment #8
slashrsm commentedIt generally looks OK. I think we shouldn't post watchdog messages for every chunk (or even every file). I'd remove this or at least use a variable that would enable/disable this debug messages. Messages should be disabled by default in the latter case.
Comment #9
bulat commentedYes, sure feel free to remove the watchdog. I left it for debugging purposes only.
Comment #10
slashrsm commentedPatch does not apply, so it probably needs a re-roll. I think we should also rename this hook to plupload's namespace, create api.php file and document this hook in it.
Comment #11
sarath.rajan commentedPlupload really helps to integrate the plupload plugin.. Really awesome...!
But currently all the files are adding in the queue, once it gets uploaded in the server (in the .tmp format). Upload submit is happening only after uploading all images and after that only we are able to see the thumbnail. I want to show the thumbnail immediately after uploading each image. Say for example, am uploading 10 images, and after image_1 gets uplaoded, process status changes to 100% and image_2 starts uplaoding. By this time I want to show the thumb nail of the image_1 in place of its name.
Is there any way to add this in this module? Thanks in advance for all your help.. :)
Comment #12
slashrsm commented@sarath.rajan: This is not related to this issue. Please open new one. Most important question here is if Plupload library itself supports this.
Comment #13
sarath.rajan commentedHi slashrsm, Thanks for your help..
I think plupload itself not support this.. :(
Is there any option to achieve this in drupal 7?