Difference between revisions of "BlobStore"
From Dreamwidth Notes
(A few notes on BlobStore to get started) |
(No difference)
|
Revision as of 07:05, 9 February 2017
This is the new (as of 2017) backend interface for file storage.
http://dw-dev.dreamwidth.org/195174.html
We're about to deploy a new backend interface for file storage, called BlobStore, which mark wrote over the past few months with the intention of standardizing how file storage is handled in our code and making it work with any number of possible underlying technologies. It currently supports MogileFS and local disk, and we plan to add support for S3 in the future.At this point, MogileFS is considered legacy technology. If your site is set up to use MogileFS, that configuration will continue to work under BlobStore for now. However, no new code that requires MogileFS will be accepted.
- What you need to know if you are writing code
- the new methods are implemented in cgi-bin/DW/BlobStore.pm and are pretty straightforward. For the most part they serve as drop-in replacements for the MogileFS file methods.
- What you need to know if you are running a server
- if you try to do anything related to uploading images, including userpics, you will get a fatal error unless you have defined either %LJ::BLOBSTORE or %LJ::MOGILEFS_CONFIG. So if you were already using MogileFS, you're fine, but if not, you will need to set up local disk storage in one of your local config files. The stock etc/config-private.pl in dw-free will have an example %LJ::BLOBSTORE that you can uncomment and use.
- What you need to know if your existing userpics disappear
- If you were running a server without MogileFS, all of your system's userpics were stored in a database table, and use of that table is no longer supported. I'm working on a new version of the migrate-userpics.pl script that can be used to move the images into your BlobStore once you've got that configured.