| 11 | | Remember to uncomment the first block of 3 rules in web/.htaccess |
|---|
| | 7 | * Copy the files into the plugin directory |
|---|
| | 8 | |
|---|
| | 9 | * Rebuild your model |
|---|
| | 10 | |
|---|
| | 11 | {{{ |
|---|
| | 12 | symfony propel-build-all |
|---|
| | 13 | }}} |
|---|
| | 14 | |
|---|
| | 15 | * Activate one or more modules in your `settings.yml` (optional) |
|---|
| | 16 | * For your backend application: sfPropelFileStorageAdmin |
|---|
| | 17 | * For your frontend application: sfPropelFileStorage |
|---|
| | 18 | |
|---|
| | 19 | {{{ |
|---|
| | 20 | all: |
|---|
| | 21 | .settings: |
|---|
| | 22 | activated_modules: [default, sfPropelFileStorageAdmin, sfPropelFileStorage] |
|---|
| | 23 | }}} |
|---|
| | 24 | |
|---|
| | 25 | * Clear your cache |
|---|
| | 26 | |
|---|
| | 27 | {{{ |
|---|
| | 28 | symfony cc |
|---|
| | 29 | }}} |
|---|
| | 30 | |
|---|
| | 31 | * Update your routing configuration |
|---|
| | 32 | |
|---|
| | 33 | {{{ |
|---|
| | 34 | # sfPropelFileStorage frontend routing |
|---|
| | 35 | download_by_file_name: |
|---|
| | 36 | url: /download/:name |
|---|
| | 37 | param: { module: sfPropelFileStorage, action: download } |
|---|
| | 38 | |
|---|
| | 39 | download_image_by_file_name: |
|---|
| | 40 | url: /images/:name |
|---|
| | 41 | param: { module: sfPropelFileStorage, action: download } |
|---|
| | 42 | }}} |
|---|
| | 43 | |
|---|
| | 44 | * Update your .htaccess file, commenting out or eliminating the first three lines and adding a new rule to check if the URL points to a real file or not. |
|---|
| | 45 | |
|---|
| | 46 | {{{ |
|---|
| | 47 | # we skip all files with .something |
|---|
| | 48 | # RewriteCond %{REQUEST_URI} \..+$ |
|---|
| | 49 | # RewriteCond %{REQUEST_URI} !\.html$ |
|---|
| | 50 | # RewriteRule .* - [L] |
|---|
| | 51 | Cond %{REQUEST_FILENAME} !-f |
|---|
| | 52 | }}} |
|---|
| | 53 | |
|---|
| | 54 | * Choose optional user manager system to use with sfPropelFileStorage plugin (defaults to none) |
|---|
| | 55 | |
|---|
| | 56 | * Execute the pake task file-storage-set-user-manager [sfGuard, none] |
|---|
| | 57 | |
|---|
| | 58 | {{{ |
|---|
| | 59 | symfony file-storage-set-user-manager <manager_option> |
|---|
| | 60 | }}} |
|---|
| | 61 | |
|---|
| | 62 | * Rebuild your models |
|---|
| | 63 | |
|---|
| | 64 | {{{ |
|---|
| | 65 | symfony propel-build-model |
|---|
| | 66 | }}} |
|---|
| | 67 | |
|---|
| | 68 | * Clear cache |
|---|