Jump to content

noswfupload help


nickbwatson

Recommended Posts

So I've been trying to use noswfupload (http://code.google.com/p/noswfupload/)

 

The uploader works fine, the only thing I'm trying to set up is the folder where the file(s) are going to be put into.

 

So the package has a file called "filereceiver.php" which contains a variable "uploadFolder" which you make whatever folder you would like your files to be uploaded to.  I thought it would be a good idea for my clients (I will ensure no one has the same name) to be able to upload files to their specific folder so I had it set up with a variable like so :

 

$uploadFolder  = "upload/$clientName";

 

The issue I'm having is I cannot get the $clientName variable to work, unless I declare the variable within the "filereceiver.php" file.  So if I put :

 

$clientName = 'Sammy';
mkdir("upload/$clientName", 0777);
$uploadFolder  = "upload/$clientName";

 

The files will all be within a folder called Sammy within the upload directory.  This works with no issues at all.  But when I try to get it to work by pulling the variable from the file the form is in, it doesn't work, it just uploads the file into the upload directory and doesn't create the folder. Basically the action of the form is "filereceiver.php", so I thought that if I created a hidden input that had a value of my client name, like so:

 

$clientName = $_POST['client'];
mkdir("upload/$clientName", 0777);
$uploadFolder  = "upload/$clientName";

 

But this does the same, it just uploads to the upload directory and doesn't create my folder.

 

Any help on this would be greatly appreciated.

 

Thanks

 

-Nick

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.