By crac on
Hi friends of the image module
Since there is no way to upload whole directories or archives into image galleries of drupal, I wrote a small command line tool in php5 to upload files from a local directory into a specified drupal gallery.
You can find the tool here on my homepage. The drupal relevant part has its own subdirectory. You have to edit drupal_upload.php and specify your user data, gallery-id (taxonomy-id), and the local directory containing the pics:
$files = DrupalGalleryUploader::scanDir('/full/path/to/images');
$user_id = 1;
$gallery_id = 16;
$uploader =& new DrupalGalleryUploader(
new DrupalUser('user', 'pwd', $user_id),
$gallery_id,
$files,
'example.com',
'/subsite'
);
$uploader->execute();
Comments
It's a dead link...
It's a dead link...
ups, sorry
You are right, sorry, here the new link
--
my httpclient for uploading whole directories to drupal image galleries (image.module)
there are ways to upload whole directories...
There are a few ways to do....
http://drupal.org/node/23645 Gallery Remote module and
http://drupal.org/project/image_import
But another way is always useful. Thanks.
Ah thx for the hint. Didnt
Ah thx for the hint. Didnt know those two; it looks like image_import is much more mature than my implementation, so you better use that one. My code only supports uploading of images, no nameing etc. and has more an educational background since I wanted to fully understand the HTTP protocoll for my http-client and learn about the new PHP5 features ... ;-)
--
my httpclient for uploading whole directories to drupal image galleries (image.module)