FileUploadInformation

From WeBWorK
Jump to: navigation, search

Main PREP Page > File Upload Info

Contents

Uploading and Using Files in the Wiki

Uploading Files

To upload a file to the Wiki, we can either upload the file and then create a link to it, or create a link that will allow the upload of the file. The latter is probably the preferred way to do this, and is described in the "Links to Uploaded Files" section below.

To upload files without using a created file link, click the "Upload file" link in the "toolbox" at the very bottom of the left sidebar in a wiki page. This allows selection of the file from your hard disk or networked drive, and specification of a file name for the uploaded file. The latter is discussed in the following section.

Naming Conventions

Note: MediaWiki doesn't allow files to have arbitrary file extensions (e.g., .doc, .tar.gz, .zip, etc.). Thus, if we want to upload a file, we have to make sure that the extension is one that is allowed: png, gif, jpg, jpeg, svg, ico, txt, flv, pdf, or swf. Using .txt seems the most innocuous, so we do that here.

To avoid file name collisions, here is a proposed file naming convention: we name the files as they would normally be named (that is, set definition files are all setSetName.def), but with the extension _model_course_name before the filename extension and .txt at the end, so that they will upload properly. Thus:

  • Set definition files: the set definition file setTopic01.def for the College Algebra model course would be named setTopic01_model_college_algebra.def.txt.
  • Set header files: the set header file setHeaderTopic01.pg for the Linear Algebra model course would be named setHeaderTopic01_model_linear_algebra.pg.txt.

If the file naturally has a .txt extension, do not bother to add a second one. The user of the file will then need to rename it without the .txt extension of that is not the correct extension for the file type.

Links to Uploaded Files

To link to a file that has been or will be uploaded to the wiki, we use the wiki markup [[File:name_of_file|link to file]]. Thus, if we want to link to the set header file for topic 01 for the model linear algebra course, we would include the wiki markup [[File:setHeaderTopic01_model_linear_algebra.pg.txt]]. If the file has had .txt appended to make it upload, it is a good idea to include a notation to that effect. For example, [[File:setHeaderTopic01_model_linear_algebra.pg.txt]] ''(Rename without the .txt extension after downloading)''

follow us