Get files from various folders like the Resources, DataModel Browser Content, Custom or Trusted and Secure Folders.
The files will usually be html, images and javascript.
To upload files see the method FilePost
THE CUSTOM FOLDER
The Custom Folder can be created under the MetaData folder to host branding files or site specific files on the Application Server.
Use the Custom Folder for these types of misc extensions and customizations as the Resource Folder is cleared down when upgrading
APPLICATION RESOURCES FOLDER
http://abcd.com/mdService1Rest/File/Resources/kendo/styles/Default/loading_2x.gif
http://abcd.com/mdService1Rest/File/Resources/jquery/jquery.min.js
C:\Program Files\philight\SharperLight\bin\Resources\
CUSTOM FOLDER
http://abcd.com/mdService1Rest/File/Custom/CompanyBranding.png
http://abcd.com/mdService1Rest/File/Custom/UserLogonBody.html
C:\ProgramData\SharperLight\Metadata\Custom\
DATAMODEL CONTENT
http://abcd.com/mdService1Rest/File/Content/DataModelCode/MyImportedFolderCode/logo.jpg?contentType=text/html
http://abcd.com/mdService1Rest/File/Content/DataModelCode/FolderName/Page2.html
TRUSTED FOLDERS
Trusted Folder locations can be defined and restricted in Site Setup / Product Settings / System / Allowed Scheduler Files in Folder.
Note: Access is denied to all the files until the folders are specified in Site Setup which requires a Service restart to take affect.
Limitations: If the URL noun space exceeds 260 charactors in length a error 400 is returned. Recommend ussing the URL parameter called path instead
to hold the file path to avoid the 400 error
e.g. ?path=fullfilepath_or_encrypted_path
http://abcd.com/mdService1Rest/File/Trusted/C:\DocStore\Scanned\INV0001.png
http://abcd.com/mdService1Rest/File/Trusted/DocStore/Scanned/INV0001.png
http://abcd.com/mdService1Rest/File/Trusted/D:\Training\Fin\Accounts.pdf
http://abcd.com/mdService1Rest/File/Trusted/Training/Fin/Accounts.pdf
http://abcd.com/mdService1Rest/File/Trusted?path=C:\DocStore\Scanned\INV0001.png
http://abcd.com/mdService1Rest/File/Trusted?path=DocStore/Scanned/INV0001.png
http://abcd.com/mdService1Rest/File/Trusted?path=D:\Training\Fin\Accounts.pdf
http://abcd.com/mdService1Rest/File/Trusted?path=Training/Fin/Accounts.pdf
TRUSTED FOLDERS – Base64
Encode the file path using base64 so users can’t directly see the location of the file.
Trusted Folder locations can be defined and restricted in Site Setup / Product Settings / System / Allowed Scheduler Files in Folder.
Note: Access is denied to all the files until the folders are specified in Site Setup which requires a Service restart to take affect.
http://abcd.com/mdService1Rest/File/TrustedHash/QzpcRG9jU3RvcmVcU2Nhbm5lZFxJTlYwMDAxLnBuZw==
http://abcd.com/mdService1Rest/File/TrustedHash/RG9jU3RvcmUvU2Nhbm5lZC9JTlYwMDAxLnBuZw==
http://abcd.com/mdService1Rest/File/TrustedHash/RDpcVHJhaW5pbmdcRmluXEFjY291bnRzLnBkZg==
http://abcd.com/mdService1Rest/File/TrustedHash/VHJhaW5pbmcvRmluL0FjY291bnRzLnBkZg==
http://abcd.com/mdService1Rest/File/TrustedHash?path=QzpcRG9jU3RvcmVcU2Nhbm5lZFxJTlYwMDAxLnBuZw==
http://abcd.com/mdService1Rest/File/TrustedHash?path=RG9jU3RvcmUvU2Nhbm5lZC9JTlYwMDAxLnBuZw==
http://abcd.com/mdService1Rest/File/TrustedHash?path=RDpcVHJhaW5pbmdcRmluXEFjY291bnRzLnBkZg==
http://abcd.com/mdService1Rest/File/TrustedHash?path=VHJhaW5pbmcvRmluL0FjY291bnRzLnBkZg==
TRUSTED FOLDERS – Encrypted
Encrypt the file path with a private key only the server knows, so users can’t directly see or change the location of the file.
Trusted Folder locations can be defined and restricted in Site Setup / Product Settings / System / Allowed Scheduler Files in Folder.
Note: Access is denied to all the files until the folders are specified in Site Setup which requires a Service restart to take affect.
http://abcd.com/mdService1Rest/File/TrustedHash/QzpcRG9jU3RvcmVcU2Nhbm5lZFxJTlYwMDAxLnBuZw==
http://abcd.com/mdService1Rest/File/TrustedHash/RG9jU3RvcmUvU2Nhbm5lZC9JTlYwMDAxLnBuZw==
http://abcd.com/mdService1Rest/File/TrustedHash/RDpcVHJhaW5pbmdcRmluXEFjY291bnRzLnBkZg==
http://abcd.com/mdService1Rest/File/TrustedHash/VHJhaW5pbmcvRmluL0FjY291bnRzLnBkZg==
http://abcd.com/mdService1Rest/File/TrustedHash?path=QzpcRG9jU3RvcmVcU2Nhbm5lZFxJTlYwMDAxLnBuZw==
http://abcd.com/mdService1Rest/File/TrustedHash?path=RG9jU3RvcmUvU2Nhbm5lZC9JTlYwMDAxLnBuZw==
http://abcd.com/mdService1Rest/File/TrustedHash?path=RDpcVHJhaW5pbmdcRmluXEFjY291bnRzLnBkZg==
http://abcd.com/mdService1Rest/File/TrustedHash?path=VHJhaW5pbmcvRmluL0FjY291bnRzLnBkZg==
SECURED FOLDERS
Secured Folder locations can be defined and restricted in Site Setup / Product Settings / System / Secured Folders.
Note: Access is denied to all the files until the folders are specified in Site Setup which requires a Service restart to take affect.
The url will require a valid user session id on the url because the request is secured. ?usid=xxx
To save,update and delete files see the POST method FilePost
http://abcd.com/mdService1Rest/File/Secured/C:\DocStore\Scanned\INV0001.png?usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/Secured/DocStore/Scanned/INV0001.png?usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/Secured/D:\Training\Fin\Accounts.pdf?usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/Secured/Training/Fin/Accounts.pdf?usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/Secured?path=C:\DocStore\Scanned\INV0001.png&usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/Secured?path=DocStore/Scanned/INV0001.png&usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/Secured?path=D:\Training\Fin\Accounts.pdf&usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/Secured?path=Training/Fin/Accounts.pdf&usid=c3eb64b5038d419b903f86d9d9b110f0Z
SECURED FOLDERS – Base64
Encode the file path using base64 so users can’t directly see the location of the file.
See Query Builder Expression EncryptBase64(path)
Secured Folder locations can be defined and restricted in Site Setup / Product Settings / System / Secured Folders.
Note: Access is denied to all the files until the folders are specified in Site Setup which requires a Service restart to take affect.
The url will require a valid user session id on the url because the request is secured. ?usid=xxx
To save,update and delete files see the POST method FilePost
http://abcd.com/mdService1Rest/File/SecuredHash/QzpcRG9jU3RvcmVcU2Nhbm5lZFxJTlYwMDAxLnBuZw==?usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/SecuredHash/RG9jU3RvcmUvU2Nhbm5lZC9JTlYwMDAxLnBuZw==?usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/SecuredHash/RDpcVHJhaW5pbmdcRmluXEFjY291bnRzLnBkZg==?usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/SecuredHash/VHJhaW5pbmcvRmluL0FjY291bnRzLnBkZg==?usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/SecuredHash?path=QzpcRG9jU3RvcmVcU2Nhbm5lZFxJTlYwMDAxLnBuZw==&usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/SecuredHash?path=RG9jU3RvcmUvU2Nhbm5lZC9JTlYwMDAxLnBuZw==&usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/SecuredHash?path=RDpcVHJhaW5pbmdcRmluXEFjY291bnRzLnBkZg==&usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/SecuredHash?path=VHJhaW5pbmcvRmluL0FjY291bnRzLnBkZg==&usid=c3eb64b5038d419b903f86d9d9b110f0Z
SECURED FOLDERS – Encrypted
Encrypt the file path with a private key only the server knows, so users can’t directly see or change the location of the file.
See Query Builder Expression EncryptPrivate(path)
Secured Folder locations can be defined and restricted in Site Setup / Product Settings / System / Secured Folders.
Note: Access is denied to all the files until the folders are specified in Site Setup which requires a Service restart to take affect.
The url will require a valid user session id on the url because the request is secured. ?usid=xxx
To save,update and delete files see the POST method FilePost
http://abcd.com/mdService1Rest/File/SecuredEnc/LzZ5ZnVFWM1c5L0p2WHdveVBxdQ==?usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/SecuredEnc/LzZ5ZnVFWM1c5L0p2WHdveVBxdQ==?usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/SecuredEnc/LzZ5ZnVFWM1c5L0p2WHdveVBxdQ==?usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/SecuredEnc/LzZ5ZnVFWM1c5L0p2WHdveVBxdQ==?usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/SecuredEnc?path=LzZ5ZnVFWM1c5L0p2WHdveVBxdQ==&usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/SecuredEnc?path=LzZ5ZnVFWM1c5L0p2WHdveVBxdQ==&usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/SecuredEnc?path=LzZ5ZnVFWM1c5L0p2WHdveVBxdQ==&usid=c3eb64b5038d419b903f86d9d9b110f0Z
http://abcd.com/mdService1Rest/File/SecuredEnc?path=LzZ5ZnVFWM1c5L0p2WHdveVBxdQ==&usid=c3eb64b5038d419b903f86d9d9b110f0Z
|