2017 © Pedro Peláez
 

symfony-bundle phpcr-fai-bundle

Download automatic inline file's documents

image

rc/phpcr-fai-bundle

Download automatic inline file's documents

  • Monday, December 16, 2013
  • by rafaelcalleja
  • Repository
  • 1 Watchers
  • 0 Stars
  • 87 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

PHPCRFileAttachaInline

Installation

Step 1: Installation

php composer.phar install rc/phpcr-fai-bundle

Step 2: Enable the bundle

Enable the bundle in the kernel:, (*1)

``` php <?php // app/AppKernel.php, (*2)

public function registerBundles() { $bundles = array( // ..., (*3)

    new RC\PHPCR\FileAttachInlineBundle\RCPHPCRFileAttachInlineBundle(),
);

}, (*4)


## Step 3: Register the bundle's routes Add the following to your routing file: ``` yaml # app/config/routing.yml _rcfia: resource: . type: rcfia

Configuration

The default configuration for the bundle looks like this:, (*5)

``` yaml rcphpcr_file_attach_inline: web_root: %kernel.root_dir%/../web controller_action: rc_phpcr.controller:FindAction extensions: - pdf preference: - phpcr - filesystem max_filesize: 3072k mimetypes: - application/pdf - application/x-pdf providers: phpcr: locales: %locales% field: filePath multilang: true field_title: phpcr_locale:{_locale}-title, (*6)


## Apache Rewrite rule run: ``` php app/console rc:apache:dump

paste result like your first rule in web/.htaccess, (*7)

example:, (*8)

# web/.htacess
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} ^/(.*\.(pdf|zip|doc|txt|PDF|ZIP|DOC|TXT))$
    RewriteRule .* app.php [QSA,L,E=_ROUTING__route:rcphpcr_file_attach_inline_homepage,E=_ROUTING_file:%1,E=_ROUTING_DEFAULTS__controller:RC\\PHPCR\\FileAttachInlineBundle\\Controller\\DefaultController\:\:FindAction]

    RewriteCond %{SCRIPT_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ app.php [QSA,L]
</IfModule>

The Versions

16/12 2013

dev-master

9999999-dev https://github.com/rafaelcalleja/PHPCRFileAttachaInline

Download automatic inline file's documents

  Sources   Download

MIT

The Requires

 

The Development Requires

inline bundle pdf attach phpcr dowload