file uploading - last modified date



Hi there,

I am writing a small application to handle file uploads for an intranet. The application prompts the user if the uploaded file already exists on the server, however, I would like to give them the option to overwrite files without prompt, if the uploaded files are newer than those on the server. I know I can use filemtime() to get the timestamp for the files on the server, but what about the uploaded files? I briefly thought I had a solution by doing filemtime($_FILES['uploaded_file']['tmp_name']), but of course this gives me the last modified date of the temporary copy on the server, not the original file. I have a feeling it is impossible to do what I am trying to do, as any timestamp data is not available in the $_FILES array - if anyone can confirm this, or perhaps give me some advice, I would appreciate it very much.

Thanks,

Ed
--
Koren Web Design Services
www.korenwebdesign.com
(304) 453 2145

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
.



Relevant Pages

  • Re: Best Practices for Impersonation and File Upload?
    ... Your answer seems more in line with the result I would suspect. ... I wanted to temporarily take on the identity of a user with more access using the WindowsImpersonationContext in order to write the file to the server and read it later. ... My primary concern is exposing the uploaded files in an insecure directory on the server where the ASPNET user has direct access. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: how do I a password challenge to submit a web form
    ... You are saving the cc info in a file on the server ... does the folder that takes the uploaded files has the permission ... |> set to allow anonymous users to upload files? ... |> also help me with the name of your website. ...
    (microsoft.public.frontpage.extensions.windowsnt)
  • Re: [PHP] Referencing files in cron jobs versus format when running from URL
    ... The uploaded files are found on the server using the above path in the code of the php file. ... when I cron the php file from the server using: ... When cron executes your script, it's doing so directly rather than through httpd, so you'll find that the environment is a little bit different. ...
    (php.general)
  • Re: Upload Form doesnt work-Something is Missing
    ... I am beginning to think that my server ... upload page properties instead of the FOLDER properties. ... Set the properties of the folder where uploaded files are stored. ...
    (microsoft.public.frontpage.client)
  • Re: webdav prompts for second password
    ... so a web server like IIS really has no idea ... > authentication for certain URLs, so it dutifully asks for authentication. ... >> prompts from reaching the user. ... But the second prompt seems unneccessary. ...
    (microsoft.public.inetserver.iis.security)