Hi
anyone come across this before?
Have created a file upload system for a client. Files are upload by clients and are downloaded via the cms. Problem I have is with the file types.
A client has uploaded a file .rng which I assume is a file produced by some specific software. (not a nokia ringtone)
The file has uploaded correctly to the correct directory as I can see it on the server.
The problem is when browsing to this particular file the browser just returns a page not found error. (this applies to ie, firefox and opera) although the file is there.
I wondered if this was a problem with the move_uploaded_file function or some other problem with php and the file type.
The only other thing that I think may be effecting it is that the server does not recognise the file and this may be causing it to return a page not found as it has nothing to open it with!
Any ideas appreciated.
Cheers
file type problems
Moderator: General Moderators
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: file type problems
You will not be able to render the file as a page, but you should be able to force a download of the file
-
lettie_dude
- Forum Commoner
- Posts: 65
- Joined: Thu Dec 07, 2006 10:10 am
Re: file type problems
Cheers jaoudestudios
Was looking at doing this anyway. Took a bit of re-coding but it worked. Just one question why do modern browser not give a choice now and try to render all files as pages even if it is something it does not recognise? Is it a security thing?
Was looking at doing this anyway. Took a bit of re-coding but it worked. Just one question why do modern browser not give a choice now and try to render all files as pages even if it is something it does not recognise? Is it a security thing?
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: file type problems
By defualt browsers will prompt you to "open" or "save" a file. On the other hand it depends on the browser settings I would imagine.
Re: file type problems
use
Code: Select all
header('content-type: application/rng');