Randomland - The Forum

Technology => Programming => Topic started by: Nick on Oct 29, 2009, 08:30 PM

Title: Image fupload folder creation
Post by: Nick on Oct 29, 2009, 08:30 PM
Recently we added a module that allows for the bulk uploading of images and the creation of their corresponding nodes. It seemed to work great! But after more then two people started using we found that newer accounts didn't work with the module. The saved path for the images was wrong, and it was putting the images is a (different) wrong location. So after a little searching online I found a post on the drupal site with a solution: http://drupal.org/node/498514

You replace the 'function _fupload_import_widget_files_directory' with a new one that has a little extra code:
if(!is_dir(file_directory_path() .'/'. $widget_file_path))
  mkdir(file_directory_path() .'/'. $widget_file_path, 0777, true);


that ensures that the directory gets created.
Title: Re: Image fupload folder creation
Post by: zourtney on Oct 29, 2009, 08:48 PM
Cool. Useful content on Randomland!

Am I crazy, or did this post say it was written by Brad earlier in the day?
Title: Re: Image fupload folder creation
Post by: Nick on Oct 30, 2009, 09:49 AM
It did... I was still logged in as him from trying to get the thing working. In my excitement I forgot to log back in as me.
Title: Re: Image fupload folder creation
Post by: Brad on Oct 30, 2009, 11:47 AM
Identity Theft!