SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Oct 2006
    Posts
    216
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Best Method for Moving upload files

    I just wondering, what is the best way to know when to move uploaded files?
    Users upload the file, need to convert it to eg. pdf and should be available for download immediately. What is the best method to identify file is uploaded, so the script can move the file and do conversion. Have the script run as cron job every 5 secs or poll the database?

  2. #2
    An average geek earl-grey's Avatar
    Join Date
    Mar 2005
    Location
    Ukraine
    Posts
    1,403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is_uploaded_file()

    Store file list in the database, and when you display list of files, query the database.

  3. #3
    SitePoint Addict
    Join Date
    Oct 2006
    Posts
    216
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok I understand, but how would the script, that does the conversion know when to do the conversion. Script have to poll the database every couple of secs or cron job very couple secs?


Bookmarks

Posting Permissions

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