PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old April 28th, 2004, 07:18 AM
craig@gravitypi craig@gravitypi is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 1 craig@gravitypi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question php file upload problem

I have a php upload module that I have used for a while that has been doing a great job of uploading jpgs, pdfs, txt, mov files etc.

Now I want to upload .wmv files, but the browser doesn't seem to pass my file type to php.

If I upload a jpeg file and say:
echo $userfile_type;
it returns "image/jpg"

If I upload a wmv file and say:
echo $userfile_type;
it returns ""
it should return "video/x-ms-wmv"

Anybody have any thoughts on this matter?

Reply With Quote
  #2  
Old April 28th, 2004, 11:28 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Maybe the mime-type doesn't exist on your server. If you're on a *NIX box, check out /etc/mime.types and look around for this mime-type. If it doesn't exist, add it. This could also break depending on how your script figures out what file type it is. If it uses the system call to "file," for example, and wmv isn't defined in the various things that call checks, then you'll need to get it added (I'm not sure how). You could also add some code that checks based on file extension, though that's not so safe -- anybody can rename something before they upload it and put something nasty on your system.
__________________
Please don't PM me asking for solutions outside the scope of a thread.
Keeping all responses in a thread stands to help others who come along later,
which is after all what this forum's all about.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > php file upload problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway