a ramblings

Some Thoughts on PUT Method Berylium

Wouldn't it be great if you could create a webpage in Mozilla Composer and publish it as a Berylium document? Or even do the same thing with just a few snippets of HTML-- sparing yourself the agony of creating well-formatted documents in s within the browser.

Well, maybe you can! Apache is perfectly willing to direct all PUT requests to a PHP script, of which Berylium is one. The http-engine could easily handle PUTs by context, although it would have to be automated, maybe based on the filename extension of the file being sent.

Tools

I need somehing better than Composer to play with an debug this, though. Amaya? I wonder. I should be able to generate PUT method requests via Berylium, too, though.

Which would be really strange, because then you would have a situation where Berylium was talking directly to itself. Strange and exciting at the same time.


Process

  1. I create an HTML page with image links and PUT it.
  2. Berylium intercepts the PUT request of the page from Apache and opens the input stream to an appropriate file location within $beryliumroot/files/$site->name/
  3. Based on the filename extension, Berylium creates a new document (html), comment (txt??), image (gif,jpg,png), audio, etc., record in the database:
    • we know the name
    • we know the folder
    • we know (from session cookie) the sitemember
    • it can be given new status, etc
  4. What are the options for returning a URL for accessing the item Beryliumside?
  5. Other PUTs for the images happen concurrently-- since you can't put folders I don't think there's any danger of too much happening at once.
  6. Berylium can deny overwrites, or use Fiatlux-style versioning.

More research to follow.

By Chris Snyder on February 9, 2003 at 10:50pm

jump to top