SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Dec 2009
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Word Document Not Uploading

    I have a document management system that allows users to upload files to the document library. The system will check the file MIME type against a list of accepted ones before uploading. If it isn't the correct type, it returns a message informing the user of the problem and the acceptable filetypes.

    Microsoft Word Docs are not uploading.


    It will work on my local test server which is XAMPP but not on the production server. I am not having any problems with any other file type.

    The production server is LAMP. It's running SUSE Linux, Apache 2.2.3 and MySQL 5.0.26.

    I am completely clueless

  2. #2
    PHP Guru lampcms.com's Avatar
    Join Date
    Jan 2009
    Posts
    921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What does 'not uploading' mean?
    Do these files make it to the server and then server refuses them or do they just not make it to the server?
    My project: Open source Q&A
    (similar to StackOverflow)
    powered by php+MongoDB
    Source on github, collaborators welcome!

  3. #3
    SitePoint Member
    Join Date
    Dec 2009
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply.

    By "upload", I mean that the system will copy the file out of the temp folder on the web server and into the "document-library" folder on the same server.

    If the document type is different than the accepted ones, the script doesn't copy the file into the "document-library" folder on the server. It deletes the file in the temp folder and notifies the user of acceptable filetypes.

    I can view the document information, file size, name, etc... for the file so I know that it is at least copying the user's file into the temp folder.

    Hope that clears it up.

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,789
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    So there is something in your code for doing the copy that isn't identifying the word document format correctly.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  5. #5
    SitePoint Member
    Join Date
    Dec 2009
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looks like I figured it out...

    I had the MIME type as "application/msword" which works on the test server.

    The production server recognized it as "application/word". I fixed the acceptable types and the problem was solved.

    Thanks for the help.


Tags for this Thread

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
  •