Difference between revisions of "FileUploadInformation"
(Created page with 'Main PREP Page > File Upload Info == Uploading and Using Files in the Wiki == === Uploading Files === To upload a file to the Wiki, we can either upload the file…') |
m (added tag) |
||
(One intermediate revision by one other user not shown) | |||
Line 11: | Line 11: | ||
=== Naming Conventions === |
=== Naming Conventions === |
||
− | 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 <code>setSetName.def</code>), but with the extension <code>_model_course_name</code> before the filename extension. Thus: |
||
+ | '''Note:''' MediaWiki doesn't allow files to have arbitrary file extensions (e.g., <code>.doc</code>, <code>.tar.gz</code>, <code>.zip</code>, 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 <code>.txt</code> seems the most innocuous, so we do that here. |
||
− | * Set definition files: the set definition file <code>setTopic01.def</code> for the ''College Algebra'' model course would be named <code>setTopic01_model_college_algebra.def</code>. |
||
+ | |||
− | * Set header files: the set header file <code>setHeaderTopic01.pg</code> for the ''Linear Algebra'' model course would be named <code>setHeaderTopic01_model_linear_algebra.pg</code>. |
||
+ | 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 <code>setSetName.def</code>), but with the extension <code>_model_course_name</code> before the filename extension and <code>.txt</code> at the end, so that they will upload properly. Thus: |
||
+ | * Set definition files: the set definition file <code>setTopic01.def</code> for the ''College Algebra'' model course would be named <code>setTopic01_model_college_algebra.def.txt</code>. |
||
+ | * Set header files: the set header file <code>setHeaderTopic01.pg</code> for the ''Linear Algebra'' model course would be named <code>setHeaderTopic01_model_linear_algebra.pg.txt</code>. |
||
+ | |||
+ | If the file naturally has a <code>.txt</code> extension, do not bother to add a second one. |
||
+ | The user of the file will then need to rename it without the <code>.txt</code> extension of that is not the correct extension for the file type. |
||
=== Links to Uploaded Files === |
=== Links to Uploaded Files === |
||
− | To link to a file that has been or will be uploaded to the wiki, we use the wiki markup <code>[[File:name_of_file|link to file]]</code>. 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 <code>[[File:setHeaderTopic01_model_linear_algebra.pg]]</code>. |
+ | To link to a file that has been or will be uploaded to the wiki, we use the wiki markup <code>[[File:name_of_file|link to file]]</code>. 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 <code>[[File:setHeaderTopic01_model_linear_algebra.pg.txt]]</code>. If the file has had <code>.txt</code> appended to make it upload, it is a good idea to include a notation to that effect. For example, <code>[[File:setHeaderTopic01_model_linear_algebra.pg.txt]] ''(Rename without the .txt extension after downloading)''</code> |
+ | |||
+ | [[Category:PREP 2011]] |
Latest revision as of 12:01, 16 June 2021
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 namedsetTopic01_model_college_algebra.def.txt
. - Set header files: the set header file
setHeaderTopic01.pg
for the Linear Algebra model course would be namedsetHeaderTopic01_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)''