Menu

#2419 downloadResourceAsTempFile should use FileSystems when possible

nextrelease
open-fixed
nobody
None
5
2021-12-22
2021-12-11
No

The method downloadResourceAsTempFile was introduced to grab any URL and make it into a temp file, so that URLs with parameters could be retrieved for scripts or bookmarks could be stored within special servers. However, this means that bookmarks files needed to be in the "raw" area of a GitHub server, making a confusing and inconsistent step, when the expectation is that if you can grab files from there you should be able to store bookmarks files as well. The method downloadResourceAsTempFile should use FileSystems when possible, so that files on GitHub and GitLabs servers can be used for bookmarks and other codes that use downloadResourceAsTempFile.

downloadResourceAsTempFile now checks to see if the file could be retrieved from the FileSystem. If it doesn't have parameters and isn't a directory ending in /, then it will be retrieved this way.

Discussion

  • Jeremy Faden

    Jeremy Faden - 2021-12-22
    • status: open --> open-fixed
     
  • Jeremy Faden

    Jeremy Faden - 2021-12-22

    This is working fine.

     
MongoDB Logo MongoDB