Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Feb 2003
    Location
    Brazil
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Uploading dirs (multiple files) - browsin' the local filesystem

    I made a script to update my site that actually deletes some files and rename some directories. As I couldn't get it to delete these files using the unlink function, I have gone with the ftp functions, and placed the script under a 'secure' directory (.htaccess) to prevent leaking my ftp login/passwd.

    I would like to upload a dir that contains a lot of files (pictures) and another subdir that also contain a lot of files (thumbnails).

    Is there anyway to use the script to browse my local disk, get the file names and put them using FTP?

    No trouble using the ftp_ functions, just dont know how to (if possible) read the contents of some directory in my local hard disk.
    Last edited by djbruno; 02-14-2003 at 02:32 AM.

  • #2
    New Coder
    Join Date
    Feb 2003
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You are not the first one to come across this problem

    I've been successful in reading a dir for all its files using ActiveX.

    But then I came across another problem. You can't change the values of an <input type=file>. You can't:

    a) <input type=file value=File>, it won't accept the value field

    b) <body onload=getElementById('fileField').value='File'>
    <input type=file id=fileField>
    </body>, It will also do nothing.

    File fields are not programable, mostly for security reasons, as you would be able to retrieve things from users computers without their permission.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •