Closed (fixed)
Project:
Upload element
Version:
6.x-1.2
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
12 Feb 2010 at 02:32 UTC
Updated:
12 Feb 2010 at 15:25 UTC
I am trying out this module for the first time. It looks to be what I need, so I am happy to see that it exists. Thanks for putting it together!
I have a question regarding the documentation in the readme file. It says this:
If you handle this yourself, make sure that you check the property submit_action to see if the object has been flagged as deleted.
I don't get it. What will the submit_action be if it has been deleted? How would it be deleted? Can you give me a little more background to this? Thank you very much.
Comments
Comment #1
jaypanJust to add, I am still curious as to the answer to my question, but I have managed to get this module working and properly saving everything to where I want it to save. Thanks! I've played with AHAH file uploads for hours, and have not been able to get it to work properly. I really need an AHAH file system for a module I am creating right now for a client, so this module is a lifesaver. Arigato!
Comment #2
alan d. commentedThe cut and paste from the example will handle this by itself, the save line. The only reason for rewriting a new function would be to handle some additional special functionality into the save action, say to clean up or rename the file name, see #368002: Prefixing filename with {user}.uid: A dynamic renaming example for an example.
The submit actions are internal to the FormAPI element to flag one of new, replaced, deleted, etc.
Make sure that you use a save function, otherwise the files will not be updated from temperory and will be deleted when the cron.php is next run!!!
Comment #3
jaypanThanks for your reply. So just to confirm, upload_element_save() will take care of checking that the status is set to the correct value?
Comment #4
alan d. commentedyes :)
Comment #5
jaypanThanks mate! I'm liking the module. Marking this as closed.
Comment #6
jaypan