Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
joanmjc  
#1 Posted : Friday, October 2, 2009 1:09:46 AM(UTC)
joanmjc

Rank: Member

Groups: Member
Joined: 11/26/2008(UTC)
Posts: 17

Hello people, I'd like to do this please help, thats all I need to my project:

- If we have 3 folders of images named: Folder1, Folder2, Fodler3

- We go to image uploader, and select the 3 folders and click “Upload”

- The 3 folders of images get uploaded on our server with their folder name as follows: Folder1, Folder2, Folder3 and each folder will contain their corresponfing group of images.

Thanks for your great support.

This is the code I already have working:

Quote:
<?php

// Check that all files are uploaded
if (array_key_exists('FileCount', $_POST))
{
// ...
// Iterate through uploaded data and save the original file and thumbnail
// ...
}

//This variable specifies relative path to the folder, where the gallery
//with uploaded files is located.

$galleryPath = "subidos/";


$absGalleryPath = realpath($galleryPath) . "/";

//Get total number of uploaded files (all files are uploaded in a single package).
$fileCount = $_POST ["FileCount"];

//Iterate through uploaded data and save the original file and thumbnail.
for ($i = 1; $i <= $fileCount; $i++)
{
//Get source file and save it to disk.
$sourceFileField = "SourceFile_" . $i;
$fileName = $_FILES[$sourceFileField]["name"];
move_uploaded_file($_FILES[$sourceFileField]["tmp_name"],
$absGalleryPath . "/" . $fileName);

//Get first thumbnail (the single thumbnail in this code sample) and save it to disk.
$thumbnail1Field = "Thumbnail1_" . $i;
move_uploaded_file($_FILES[$thumbnail1Field]["tmp_name"],
$absGalleryPath . "/Thumbnails/" . $fileName . ".jpg");
}
?>

Tamila  
#2 Posted : Friday, October 2, 2009 3:30:36 PM(UTC)
Tamila

Rank: Advanced Member

Groups: Member
Joined: 3/9/2008(UTC)
Posts: 554

Was thanked: 1 time(s) in 1 post(s)
Hello,

How to upload folders you can read here:
Uploading Folders
I hope it helps you.
Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.