Skip to the content
Documentation

viewfile

No ratings yet

Available since Exponential 6.0.15 (in development, not in a release yet).

Summary

package/viewfile/<PackageName>/<FileIndex>: streams one raw file out of a package's own directory - an image the contents browser shows inline (package/view/full.tpl's <img>), or anything else offered as a plain download. <FileIndex> is the file's position in eZPackageFileBrowser::allFiles()'s own sorted list, not its path (a relative path can carry slashes of its own, which a bare URL segment cannot hold safely); eZPackageFileBrowser:: filePath() is the one gate that actually reads it off disk: no path traversal, no absolute path, no following a symlink out of the package's own directory. Ker

Parameters

Name Kind
PackageName ordered
FileIndex ordered
RepositoryID ordered

Policy

package/read

Source

kernel/package/module.php, kernel/package/viewfile.php

See also

Generated example: package/viewfile

Added to the reference for Exponential 6.0.15.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.