By Tenx-1 on
HI there,
Is there a module that would allow creation of folders inside the file system for each content created.
Let's say i have a content types for courses, then when i create a "Chemistry" content from the courses content types , it automatically create a folder inside the file system .
The chemistry folder will be created inside another folder called "courses" inside the file system .
THX.
Comments
Anyone ????
Anyone ????
Please don't post the same
Please don't post the same question multiple times. Here are some Tips for posting to the Drupal forums.
---
"Nice to meet you Rose...run for your life." - The Doctor
My first public Drupal site - EyeOnThe503
Check out the Filefield
Check out the Filefield Paths module - http://drupal.org/project/filefield_paths
I'm not sure I understand.
I'm not sure I understand. Drupal stores the content (nodes) in a database, not in separate files stored on the server. If you're talking about the URL structure that is used to access the content, then you should look into enabling Clean URLs and check out the Pathauto module to help control the URLs created for your content.
---
"Nice to meet you Rose...run for your life." - The Doctor
My first public Drupal site - EyeOnThe503
Ok i dont know how to make
Ok i dont know how to make this any clearer, but all im after is a module that allow a creation of folders inside the filesystem(sites/default/files..), these folders can be used to store multiple files uploaded by user.
Let's say :
1. we have a folder called BIOLOGY inside the filesystem, so all biology related files will be uploaded to this folder.
2.we could have another folder called MATH inside the filesystem , and all math related files would be uploaded to it.. and so on...
So im looking at a way of creating these folders through the creation of CCK.
When creating a biology content by filling out CCK fields, and then saving or submitting , not only does it insert info to the database but also create a folder named biology.
i will checkout the filefield module, but i doubt it will help much...
hook_nodeapi
You want to be able to trigger a function to create a file when you create a node, if I understand correctly. You will need to build this yourself, but you have some help from the Drupal api.
http://api.drupal.org/api/function/hook_nodeapi.
There's a lot you'll need to decide for yourself. If I was doing it, I'd use CCK to add a field to my content type, and then have hook_nodeapi in a custom module react to a node insert or update by calling the php file manipulation functions and creating files and folders according to some set of conditions determined by the value of the CCK field.
Hope that points you in the right direction.
Doug Gough
ImageX Media
Well, this is a clearer
Well, this is a clearer description. You didn't mention file uploads anywhere in your original post, just creating content (which does not mean that there are any file uploads).
I see others have already replied based on the additional information.
---
"Nice to meet you Rose...run for your life." - The Doctor
My first public Drupal site - EyeOnThe503
Thanks guyz for the
Thanks guyz for the suggestions,
im in the process of invistigating drupal upload module and other file upload module.
But i think im gonna have to write a custom content types module , then use node_api , triggers and actions in order to achieve my goal.