#1485 closed enhancement (fixed)
File items should be able to reference external files — at Version 16
Reported by: | Nicklas Nordborg | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | major | Milestone: | BASE 2.16 |
Component: | core | Version: | |
Keywords: | Cc: |
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.
Change History (16)
comment:1 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 15 years ago
comment:3 by , 15 years ago
comment:4 by , 15 years ago
comment:5 by , 15 years ago
comment:6 by , 15 years ago
comment:7 by , 15 years ago
comment:8 by , 15 years ago
comment:9 by , 15 years ago
comment:10 by , 15 years ago
follow-up: 13 comment:11 by , 15 years ago
comment:12 by , 15 years ago
comment:13 by , 15 years ago
Replying to nicklas:
(In [5334]) References #1485: File items should be able to reference external files
File download test failed on windows because subversion modified line breaks in the reference file. Do not change the svn:eol-style of this file!
For future reference: Another option could be to set the file as binary, subversion doesn't tamper with binary files.
comment:14 by , 15 years ago
So far it seems to work fine with http and also with https if the server has a valid certificate and doesn't require any authentication. It doesn't work with self-signed, expired or other invalid certificates or if the server requires authentication.
The Proteios project has solved some parts of this by creating a specific SSLSocketFactory
that reads information about trusted servers and authentication information from certificate files stored on the server.
comment:15 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:16 by , 15 years ago
Description: | modified (diff) |
---|
(In [5325]) References #1485: File items should be able to reference external files
Added URL field to File item and Location.EXTERNAL. Updated test code with some more test cases and file download. This change can be a major issue for code that rely on File.getSize() or File.getLocation().
Plug-ins that use the file size to report progress most likely needs to be updated to cover the case were the file size is not known.