![]() | clearString neatComponents
|
|
![]() | ||
![]() | Components | ![]() |
Upload |
The Upload component allows files to be uploaded to the server.
For security reasons the Upload component choses its own location where uploaded files are stored. Otherwise, executables could be uploaded to the server or system files overwritten.
The file location - highlighted below - is used to reference the component.
A Permission allows you to choose whether the upload location is displayed to to the user or hidden.
A Permissions controls whether the user can view files already uploaded. If they can, they can right-click on one, and Delete it, or Open it.
Referencing the uploaded files
The uploaded files are held in a folder in the path shown under Directory (indicated above).
For example:
C:\Program Files (x86)\Enstar\neatComponents\wwwroot\sites\10494\40\files
To link to a file in this Upload Directory simply create a relative path with two dots .. and flip the slash from \ to /, thus
../40/files/
For example:
<source src="../40/files/example.jpg" />
The Upload component is useful as part of integration solutions, where you need to allow (suitably logged-in users) to upload files to the server for later processing, for example as part of a batch import process. It is used to upload jQuery .js and .css files.
It can also be used as a light-weight stand-alone function to enable people to share files, however it does not record who uploaded the files, nor does it provide any opportunity to store meta-data alongside the files.
For those capabilities, use a Table with a field of the File datatype.