Ticket #208 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

[PATCH] make the upload handler REST friendly

Reported by: chr..@oxdi.eu Assigned to:
Priority: medium Milestone: 0.4
Component: Merb Keywords: upload_handler
Cc:

Description

The array of paths specified for the upload handler is not flexible to work for REST style URLs.

If you want to update a file in a RESTful world you will probably have a request like:

{{{PUT /attachment/34}}

where 34 is some sort of variable id.

This patch addresses this by

** allowing you to specify a regular expression to dictate a valid upload ** moving the upload-settings into merb.yml & removing upload.conf (left over from plugin?) ** adding a spec to ensure that invalid paths do not trigger #valid_upload?

By using a regex you should be able to achieve URL masking for any number of URLs

Attachments

more_flexible_upload_handler.diff (4.7 kB) - added by chr..@oxdi.eu on 09/25/07 14:22:00.
RESTafarean upload handler

Change History

09/25/07 14:22:00 changed by chr..@oxdi.eu

  • attachment more_flexible_upload_handler.diff added.

RESTafarean upload handler

09/25/07 14:38:17 changed by e.@brainspl.at

  • status changed from new to closed.
  • resolution set to fixed.

(In [692]) make upload handler more flexible, move config into merb.yml, closes #208