[
https://issues.apache.org/jira/browse/TAP5-423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693772#action_12693772
]
manuel aldana commented on TAP5-423:
------------------------------------
sure, any ideas and source code appreciated (maybe just attach it to ticket). i
am also looking into other assets (CDN -> simple url passthrough, database),
but currently working on the filesystem thing only.
I decided in favor of:
@Path("filesystem:/fs1/asset.txt")
private Asset filesystemAsset;
'filesystem' says it is a filesystem assets. 'fs1' stands as a symbol. for that
symbol you need to configure a mapping *configuration.put(fs1,/srv/images/)*.
you can define as many fs[0-9] as you want.
currently the symbol is fixed to the fs[0-9]+ pattern, so the AssetDispatcher
knows to dispatch it to a filesystem resource. this implies that client would
know from url pattern that the asset points to the filesystem (this is somehow
consistent to ctx/ and app/ snippets of current asset types). don't know
whether this is a security issue....
for non existent files, maybe it is good to just return a HTTP 404 instead of
displaying exception report page.
> Implement a file-system Asset type
> ----------------------------------
>
> Key: TAP5-423
> URL: https://issues.apache.org/jira/browse/TAP5-423
> Project: Tapestry 5
> Issue Type: New Feature
> Components: tapestry-core
> Affects Versions: 5.0.18
> Reporter: manuel aldana
>
> currenty it is built in to retrieve assets from classpath and from webcontext.
> a file system asset type which can retrieve stuff directly from the
> filesystem (e.g. from /srv/statics/xxxx) makes also sense.
> something like:
> *ResourceFileSystem extends AbstractResource* and *FileSystemAssetFactory
> extends AssetFactory*
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.