keyongtech


  keyongtech > perl > 10/2007

 #1  
10-10-07, 03:44 PM
ll
I'm working with an uploader script and am trying to establish the
parent directory to which files will be uploaded. However, after the
parent directory is set in the code and the file is uploaded, a folder
is created 'under' the cgi-bin folder that has the full path name as
its title, rather than using that path as the basis upon which to
concatenate the rest of the path. The page, when run, says that the
file has been uploaded successfully, but when following the link it
generates to the file, it cannot be opened, due to a repeat in the
path (e.g. www.mysite.com/uploads/uploads/test.txt)

Here is the URL for the download for this: http://www.cnctek.com/bizdb-html/download.html

Follow this link:
Download File Uploader - use "guest" for user name and password

Thanks for any help or resources,
Louis
 #2  
10-10-07, 04:07 PM
Gunnar Hjalmarsson
ll wrote:
> I'm working with an uploader script and am trying to establish the
> parent directory to which files will be uploaded. However, after the
> parent directory is set in the code and the file is uploaded, a folder
> is created 'under' the cgi-bin folder that has the full path name as
> its title, rather than using that path as the basis upon which to
> concatenate the rest of the path. The page, when run, says that the
> file has been uploaded successfully, but when following the link it
> generates to the file, it cannot be opened, due to a repeat in the
> path (e.g. [..])
>
> Here is the URL for the download for this: [..]
>
> Follow this link:
> Download File Uploader - use "guest" for user name and password


If that script doesn't work as expected, please consult the
documentation or the script author.

If you want to write your own script, and are encountering difficulties
when doing so, this group may be a good place to ask for help. Btw, you
may want to make use of the CPAN module CGI::UploadEasy.
 #3  
10-10-07, 10:04 PM
ll
On Oct 10, 10:07 am, Gunnar Hjalmarsson <nore> wrote:
> ll wrote:
>>

> If that script doesn't work as expected, please consult the
> documentation or the script author.
>
> If you want to write your own script, and are encountering difficulties
> when doing so, this group may be a good place to ask for help. Btw, you
> may want to make use of the CPAN module CGI::UploadEasy.
>
> --
> Gunnar Hjalmarsson
> Email:[..]



Gunnar,
Thanks for your reply. I've now got the files to upload (to "cgi-bin/
upload/" - for some reason I cannot get them to upload to "root/
upload/". I am able to open the files from the ftp client, although
when I try opening them via the link created (which turns out to be
the empty "root/upload/" directory) on the page, I get the following
error:
"Not Found
The requested URL /upload/comm_khicks.gif was not found on this
server.
Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request. "

I would like a way to view/open the files within the "root/upload/"
directory. Thanks for the tip re CGI::UploadEasy.

Louis
 #4  
10-11-07, 01:41 AM
Gunnar Hjalmarsson
ll wrote:
> On Oct 10, 10:07 am, Gunnar Hjalmarsson <nore> wrote:
>> If that script doesn't work as expected, please consult the
>> documentation or the script author.
>>
>> If you want to write your own script, and are encountering difficulties
>> when doing so, this group may be a good place to ask for help. Btw, you
>> may want to make use of the CPAN module CGI::UploadEasy.

>
> Thanks for your reply. I've now got the files to upload (to "cgi-bin/
> upload/" - for some reason I cannot get them to upload to "root/
> upload/".


I had a look at the script's config variables. Try this setting:

$parent_dir = "$ENV{DOCUMENT_ROOT}/";

> I am able to open the files from the ftp client, although
> when I try opening them via the link created (which turns out to be
> the empty "root/upload/" directory) on the page, I get the following
> error:
> "Not Found
> The requested URL /upload/comm_khicks.gif was not found on this
> server.
> Additionally, a 404 Not Found error was encountered while trying to
> use an ErrorDocument to handle the request. "
>
> I would like a way to view/open the files within the "root/upload/"
> directory.


As long as the files are not saved in that directory, you can't
reasonably be expecting to view/open the files there, can you?

> Thanks for the tip re CGI::UploadEasy.


You're welcome. Note, again, that this group is for discussing Perl
programming, not for assistance with ready-to-use scripts.
 #5  
10-11-07, 10:35 PM
ll
On Oct 10, 7:41 pm, Gunnar Hjalmarsson <nore> wrote:
[..]
> As long as the files are not saved in that directory, you can't
> reasonably be expecting to view/open the files there, can you?
>> You're welcome. Note, again, that this group is for discussing Perl

> programming, not for assistance with ready-to-use scripts.
>
> --
> Gunnar Hjalmarsson
> Email:[..]



Gunnar,
Many thanks - that was what it needed - the correct diretory is
receiving and displaying the files. Also, thanks for the word on the
group - will look for a group more suitably tailored to this.

regards,
Louis
Similar Threads
Ajax File Uploader

My asp.net 3.5 web application needs to upload many user documents to the SQL Server database. I don't quite like the asp.net native FileUpload control, so I searched a...

file uploader

Hi, Due to the file size limitations of the common browsers like IE or Firefox, I wanted to create a file uploader that doesn't use a browser, but just posts a file to a...

Multiple file uploader

Hi, I'm using the excellent Multiple file uploader ( [..] ) After selecting the files (as per the Defaults example on [..] ), I use a Submit button to send the data to a...

flash/php file uploader

Hi Sorry if this is considered off topic, but do you know of any code examples/libs with a flash/php file uploader with progress bar? I've googled for a while but the...

file uploader

Does anyone know how i can go about getting a file uploader on my FrontPage 03 website.


All times are GMT. The time now is 11:37 AM. | Privacy Policy