Add: set :public_folders, '/home/x/y/', '/tmp/','/another/dir/' - as well as add an alias name
I would like to propose adding:
set :public_foldersThat is, the plural form Right now we can use this:
set :public_folderaka singular; and then the directory from where to serve static files, as String.
Also, "folder" sounds very windows-centric. Isn't this simply a directory, for linux-based systems? Should we then really call it a "folder", in the API?
So I also suggest:
set :public_directoryAnd the plural, public_directories, as equivalent aliases. Anyway.
What is the use case for:
set :public_folders?
We simply add an Array, via argv *, afterwards, such as shown in the title:
set :public_folders, '/home/x/y/', '/tmp/','/another/dir/'
set :public_directories, '/home/x/y/', '/tmp/','/another/dir/' # same but this is a better name IMOThe idea is to have several directories serve static files, spread out over the local filesystem. In fact, this is also my use case: for many reasons, my images are spread all over the local filesystem, so I don't have one public directory ever.
Right now it seems we can only specify one public directory which is strange.
I guess the work around I will use is to copy all local images into a temporary directory, which is possible, but it also seems a bit silly. Has really nobody else ever had a simple use case to use more than one directory here? Also the public API documentation should mention this, so that people can find what to do. Right now sinatra's documentation is ok, but not great - we should improve on it in general. (I used to read up more in the past, then made a break of 2-3 years, so right now I am refreshing my old memory again.)
Source: sinatra/sinatra