File items should be able to reference external files
|Reported by:||Nicklas Nordborg||Owned by:||Nicklas Nordborg|
Description (last modified by )
If we add a URL field to a file item, it should be possible to link a file item in BASE with a file on the internet. It should be "invisible" to users in the sense that
File.getDownloadStream() should act as a proxy for the file. To begin with we should support at least http and https URLs.
We need to investigate how some of the other file properties should be interpreted. For example:
- Location: can be PRIMARY, SECONDARY and OFFLINE. Many places will only work when location=PRIMARY since that is the only setting were
getDownloadStream()returns any data, but PRIMARY also means that the file should be located on the BASE server.... Hmmm... maybe we should add a fourth option (EXTERNAL?) and add a notice about a possible incompatible change.
- Size: The file size is usually stored automatically when the file is upload and is retained if the file is taken offline. Some code may require file size > 0. Since we don't know the size of external files (or can we issue a HEAD request to find out?) we may have to update some code that makes decisions based on the size.
- External files should not contribute to quota as far as BASE is concerned.
For instructions on how to setup a test environment with a https server that only accepts clients with a trusted certificate see HttpsFiles.