Difference between revisions of "File Name Restriction"

From SmartWiki
Jump to: navigation, search
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
On [[Custom Field Type: Link – Single File|Single File]] and [[Custom Field Type: Link – Multiple Files|Multiple File Upload]] fields, you can enforce a file naming convention to files uploaded to SmartSimple.  
 
On [[Custom Field Type: Link – Single File|Single File]] and [[Custom Field Type: Link – Multiple Files|Multiple File Upload]] fields, you can enforce a file naming convention to files uploaded to SmartSimple.  
  
To configure this feature, edit the custom field, and enter the extension(s) matching the file type(s) you wish to constrain the field to be able to upload into the File Type Restriction setting, and save your changes.  
+
To configure this feature, edit the custom field, enter the file name you want to enforce on all files uploaded to this field, and save your changes.  
  
[[Image:FileTypeRestriction.png|link=]]
+
[[Image:FileNameRestriction.png|link=]]
  
* [[Custom Field Type: Link – Single File|Single File]] and [[Custom Field Type: Link – Multiple Files|Multiple File Upload]] fields can accept multiple file types. The extensions should be entered in lower case separated by commas
+
The file name restriction feature is [[Variable processor|variable processor]] compatible for both [[Custom Field Type: Link – Single File|single file]] and [[Custom Field Type: Link – Multiple Files|multiple file uploads]]. For example, the following configuration will enforce uploaded files to be renamed to: ''name of the current Level 1 record'' - ''current year'':
  
Example: "pdf,doc,xls"
+
[[Image:VariablesInFileNameRestrictions.png|link=]]
  
If a Single File Upload field has a File Type Restriction of "pdf", and a user tries to upload a document with a different extension, they will receive the following message:
+
<pre style="white-space: pre-wrap;  white-space: -moz-pre-wrap;  white-space: -pre-wrap;  white-space: -o-pre-wrap;  word-wrap: break-word;">Note: Enforcing a file name does NOT affect the file extension.</pre>
 +
When users upload their files, they will be presented with a message informing them that their files will be renamed per the naming convention you have specified:
  
[[Image:FileTypeRestricted.png|link=]]
+
[[Image:File Renamed To.png|link=]]
  
If a Multiple File Upload file has a File Type Restriction of "pdf", and a user tries to upload documents with different extensions, they will receive the following message:
 
  
[[Image:MultiFileTypeRestricted.png|link=]]
+
When ''File Name Restriction'' is configured, multiple files uploaded to the same field will be named with version numbers. If your ''File Name Restriction'' is set to ''filename'', the first file uploaded will be renamed ''filename'', the second file uploaded will be renamed to ''V_1_filename'', etc.  
  
To remove the document with the incorrect extension, click on the red "X" button ([[Image:Redx.png|link=]]).
+
<pre style="white-space: pre-wrap;  white-space: -moz-pre-wrap;  white-space: -pre-wrap;  white-space: -o-pre-wrap;  word-wrap: break-word;">Note that any spaces in file names specified will be replaced by the underscore character ("_"). Certain special characters including colons, commas, asterisks, percentage signs and question marks in the file names will also be replaced with underscores.</pre>
  
 
==See Also==
 
==See Also==
 
* [[Custom Field Type: Link – Single File]]  
 
* [[Custom Field Type: Link – Single File]]  
 
* [[Custom Field Type: Link – Multiple Files]]
 
* [[Custom Field Type: Link – Multiple Files]]
 +
* [[File Type Restriction]]
 +
* [[Display Additional File Attributes for PDF Documents]]
  
[[Category:Custom Fields]]
+
[[Category:Custom Fields]][[Category:Files]]

Latest revision as of 10:37, 6 April 2017

On Single File and Multiple File Upload fields, you can enforce a file naming convention to files uploaded to SmartSimple.

To configure this feature, edit the custom field, enter the file name you want to enforce on all files uploaded to this field, and save your changes.

FileNameRestriction.png

The file name restriction feature is variable processor compatible for both single file and multiple file uploads. For example, the following configuration will enforce uploaded files to be renamed to: name of the current Level 1 record - current year:

VariablesInFileNameRestrictions.png

Note: Enforcing a file name does NOT affect the file extension.

When users upload their files, they will be presented with a message informing them that their files will be renamed per the naming convention you have specified:

File Renamed To.png


When File Name Restriction is configured, multiple files uploaded to the same field will be named with version numbers. If your File Name Restriction is set to filename, the first file uploaded will be renamed filename, the second file uploaded will be renamed to V_1_filename, etc.

Note that any spaces in file names specified will be replaced by the underscore character ("_"). Certain special characters including colons, commas, asterisks, percentage signs and question marks in the file names will also be replaced with underscores.

See Also