I am creating a website that will allow users to upload projects. Project submissions will consist of a couple of text fields, a screenshot and a .zip file. Once the user uploads their project, I need to unzip the .zip file and catalog its contents. Also, it needs to be possible to upload these projects through the web interface "Add New Content" and through Node.create by way of the services module.
So my first question, is there a way to hook up a module that will be triggered after a content type is created? I built my project content using the built in Drupal 7 CCK editors but I see no way to hook up some code to this that could unzip my file and then do whatever else needs to be done.
Now if the above is not possible using CCK does that mean I need to recreate this content type by making it into its own module?
Finally, where would be the best place to put this unzipping code? I could see it might be cleaner to make a standalone module for unzipping but might it be easier to put this code directly in the content module (if I have to make one)?