i have uploaded file(PDF 4mb) on server it is stored in blobdir. and reference in object of MYCLASS with attribute attachment in (zodb data.fs). if i am deleting object of MYCLASS then that object is deleted but the file(PDF 4mb) on blobdir is not deleted. how to delete that blob file after object is deleted?
how to remove file(blob) from blobdir after object is deleted form zodb(data.fs)
387 Views Asked by Shrinivas Mese At
1
There are 1 best solutions below
Related Questions in PYRAMID
- OpenShift Pyramid logging to file
- How do I revert / undo a `session.execute()` statement in SQLAlchemy
- Sharing objects between view and application with Pyramid
- Cornice schema validation with colanderalchemy
- uWSGI: How can I mount a paste-deploy (Pyramid) app?
- Paste.deploy - Is it possible to pass 2 config files?
- How to ship stored procedures (PL/PGSQL) to be used by Pyramid web app to the environment?
- Global variables shared across all requests in Pyramid
- UPDATE statement on table xxx' expected to update 1 row(s); 0 were matched with Zope transactionmanager
- Search box/field design with multiple search locations
- Url-Specific 404 Not Found With Traversal Routing
- Create dynamic class-views in pyramid
- Add renderer in @view_config from configuration?
- pyramid project created with pycharm raises a ValueError: Variable assignment
- Pyramid and Cornice XML renderer
Related Questions in ZOPE
- How do I revert / undo a `session.execute()` statement in SQLAlchemy
- How do I override the main template in Plone 3?
- UPDATE statement on table xxx' expected to update 1 row(s); 0 were matched with Zope transactionmanager
- Setting an expiry date or a maximum age in the HTTP headers (Zope infrastructure)
- Usage of ZODB temporary storage
- Bika LIMS samples page does not exist
- Customize Plone view class without touching the template
- Zope.Schema/Plone - How can I set the value of a Datetime field in an updateWidget function?
- How to find large objects in ZODB
- How to make zope load my ZCML?
- How to access a "plone site object" without context?
- How to get informations about a zope/plone instance during execution?
- How to create zebra-stripe CSS with TAL?
- Is there something like a "symbolic link" (in *nixes terms) but for objects in ZODB in Plone?
- Zope external editor with upload-on-save (Notepad++ prefered)
Related Questions in ZODB
- Where is the main space used up in Plone file upload?
- Usage of ZODB temporary storage
- How to find large objects in ZODB
- ZEO ZODB database - run locally not working
- Import errors on subsystems for ZODB, but only for Py.Test
- Is there something like a "symbolic link" (in *nixes terms) but for objects in ZODB in Plone?
- What is the difference between the various ZODB blobstorage layouts?
- In Zope/ZODB, how to delete objects from a BTreeFolder2
- zc.lockfile.LockError in ZODB
- move plone site to subfolder without changing modification date
- Which options for python deployment do I have if GCC not working anymore
- Standard way to disconnect from database in cherrypy?
- Is ZODB Bloat necessarily a bad thing?
- Why is Data.fs.old disappearing?
- How to use blobs > 1GB in zodb relstorage with sqlite backend?
Related Questions in FILE-STORAGE
- Error for cv::FileStorage in JNI
- Android - How to create a folder that can't be accessed by user?
- While getting file from dropBox using chooserIntent , activity listening to result gets restarted(onCreate gets called) someTimes
- Best folder structure for storing image in filesystem?
- Display file from Storage path laravel
- Laravel how download file for Auth() user in dashboard view
- Is Cassandra good for storing files?
- how to remove file(blob) from blobdir after object is deleted form zodb(data.fs)
- Azure Mounted File Storage is not a valid Virtual Path
- limiting access to stored files
- How to access temporary uploaded file in web2py?
- What architecture would you use to store 10 billion MIME messages and make it deletable and full text searchable incl. attachments
- Coldfusion - allow user to choose where to save generated csv file
- how to handle file storage on namecheap (s3 bucket replacement)?
- Multiple buffers on the same file
Related Questions in BLOBSTORAGE
- Create File in Azure Blob Storage Using UploadText
- "Stream is too long" when uploading big files on Azure Blob Storage
- How to list subdirectories in Azure blob storage
- QT Creator connection in WIndows Azure Storage
- Google AppEngine BlobInfo() features
- Why do I get org.hibernate.HibernateException: IOException occurred reading a binary value
- Azure Alert for Blob count
- Dynamically send blobs from azure storage account to email using azure logic apps
- Save Image as Blob in Db
- MongoDB temporary video storage and repair database
- how to remove file(blob) from blobdir after object is deleted form zodb(data.fs)
- Configure Plone to use Relstorage as blobstorage
- Get-AzStorageBlob API Hangs often for a large blob container
- Is changing an access tier considered as a write Operation, and does it incur any associated cost?
- Azure blob availability during an overwrite
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The file is part of a past ZODB revision. You'll need to pack your ZODB database to remove historical revisions.
How far back you pack your database is up to you. Once you have removed old revisions you can no longer roll back the database to those states anymore.
How you pack the ZODB depends on your setup. If you are using ZEO there is a command-line tool (
zeopack) that instructs ZEO server to pack the storage for you.You can also do it programmatically; from your Pyramid app, for example, with the
db.pack()method:I used the
daysparameter to pack the ZODB but retain history for the past week. You can also use a timestampt(UNIX seconds since the epoch) to specify a specific point in time to which to pack, or omit either to remove all old revisions.Once the revision that references the blob is removed, the blob file is not immediately removed; whenever you pack a backup is created in case you need to revert the operation. A future pack operation replaces the previous backup with the new backup, clearing the blobs for good.