No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
The content-length will in this case be the zipped length | The content-length will in this case be the zipped length | ||
The viewModelColumn that was tagged with BlobDownloadLink may be accompanied by a '''_FileName''' column. '''Note!''' Case sensitive. | The viewModelColumn that was tagged with BlobDownloadLink may be accompanied by a '''_FileName''' column. '''Note!''' Case sensitive. Note that the filename is set during upload so this column need to exist in the upload view model. | ||
If your tagged columns was MyColumn - and you add a '''MyColumn_FileName''' on the same nesting (this need not be shown but must exist) - and that column is of type string - then the GetVMFile controller will mark the response as attachment with result as a file name. | If your tagged columns was MyColumn - and you add a '''MyColumn_FileName''' on the same nesting (this need not be shown but must exist) - and that column is of type string - then the GetVMFile controller will mark the response as attachment with result as a file name. |
Revision as of 18:53, 24 January 2019
When you tag a ViewModelColumn with BlobDownloadLink = true - the UI will render this as a download. It will use the controller named GetVMFile to allow for a download of content type application/octet-stream. If your request has accept-encoding:gzip - then we will gzip the file on the server before sending it back. The server will tag the response header like this: content-encoding:gzip content-length:16660 content-type:application/octet-stream
The content-length will in this case be the zipped length
The viewModelColumn that was tagged with BlobDownloadLink may be accompanied by a _FileName column. Note! Case sensitive. Note that the filename is set during upload so this column need to exist in the upload view model.
If your tagged columns was MyColumn - and you add a MyColumn_FileName on the same nesting (this need not be shown but must exist) - and that column is of type string - then the GetVMFile controller will mark the response as attachment with result as a file name.