Can't view uploaded files!!!

Can't view uploaded files!!!

by Simon James -
Number of replies: 1

When uploading files (either within resources or activities) the /files/ window seems to have uploaded the files - though when i select them to view I get an error message:

The Page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

Please try the following:

  • If you typed the page address in the Address bar, make sure that it is spelled correctly.
  • Open the pcol-webtest home page, and then look for links to the information you want.
  • Click the Back button to try another link.

HTTP 404 - File not found
Internet Information Services

Anyone know why?

Thanks

Simon

Average of ratings: -
In reply to Simon James

Re: Can't view uploaded files!!!

by Vu Hung -

OK, It's common error with IIS. Read the following instruction by Martin:

For example: Not Found: The requested URL /moodle/file.php/2/myfile.jpg was not found on this server.

A common symptom is that user profile images don't display properly.

How to fix under Apache:

Your web server needs to be configured to allow the part of the URL after a script name to be passed directly to the script. This should be enabled by default in Apache 1, but is usually disabled by default in Apache 2. To turn it on, add this line to your httpd.conf, or to a .htaccess file in your local directory (see the Install documentation for more details):

AcceptPathInfo on

Note, this will ONLY work for Apache versions 2.x.

How to fix under IIS:

You need to enable the setting AllowPathInfoForScriptMappings.  See this Microsoft Knowledgebase article for more information about how to do this.

Workaround in Moodle:

If for some reason you are not able to fix this problem properly as above, then you can switch Moodle to use an alternative method. The disadvantages are a slight loss of performance for your users and you won't be able to use relative links within HTML resources.

To use this alternative method: login as Admin, go into the "Configure Variables" page and change the setting for "slasharguments". You should now be able to access your uploaded files.

I hope it's OK

Good luck!

Average of ratings: Useful (1)