Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Zip Archive
LarryL
The mediabin client interface gives users the ability to select multiple assets and download them as one ZIP file. Is there a way to use this functionality with assets that reside on the server only (not mediabin)?
Scenario:
- We have an application that generates multi-page PDFs from assets stored in Mediabin.
- These PDF files are stored temporarily on our server, then deleted (weekly, monthly...). There is no need for us to store these new PDF files in Mediabin since we can regenerate them anytime.
- We want to take 1-n number of multi-page PDFs and push them to a user in 1 ZIP file. (SIT files for MAC users)
Is there a way to do this using the mediabin tools, without injesting this new asset(s) into mediabin? Can this be accomplished with the .NET API or Mediabin Task?
Thanks for your help!
Find more posts tagged with
Comments
Migrateduser
The "Package the assets as a zip file" functionality is not really an internal MediaBin Server functionality.
In the Web Client, it is obtained by using the MBUtils.Archive class, which contains the following Sub:
Compress arrFiles, strArchiveFullName, intArchiveType
with
arrFiles being an array of file paths (strings),
strArchiveFullName being the path to the result archive file, and
intArchiveType being one of these values:
const MBArchiveType_SIT = 0
const MBArchiveType_SIT5 = 1
const MBArchiveType_ZIP = 2
const MBArchiveType_TAR = 3
const MBArchiveType_GZIP = 4
const MBArchiveType_BZIP2 = 5
const MBArchiveType_RAR = 6
const MBArchiveType_PF = 7
const MBArchiveType_LHA = 8
const MBArchiveType_HA = 9
const MBArchiveType_CPT = 10
const MBArchiveType_ARJ = 11
const MBArchiveType_ARC = 12
Hope this helps...
Migrateduser
I just wanted to point out that creation of the zip archive is done by code that resides on the web server, not on the MediaBin server. You should avoid using the Zip package through MBUtils. It uses a COM wrapper around zlib. The COM wrapper has been heavily customized to suit the requirements of the MediaBin web client and could change depending on future needs.
Zip has been incorporated into 2003 server and xp. Command line zip is free from PKWare. It sounds like you could just write a Windows batch file script (.bat) or a Windows Scripting Host script (.vbs) to zip the files on the file system using one of these packages. If you need a COM interface, there are a number of open source COM wrappers around zlib that are freely available. I'm not sure how you intend to "push" them to the user (email perhaps?).
Sit is a proprietary format and you must purchase the package and license it from Allume Systems (
www.allume.com)
.
MediaBin has a mechanism to run tasks on files that don't reside in the repository. This is a short circuit task. It can be used to invoke MediaBin repurposing primitives to run on files that are not in the MediaBin repository. However, the application code to use short circuit tasks is something a customer would create and it doesn't include archiving the results. The ShortCircuitTask VB6 sample app demonstrates using short circuit tasks.
LarryL
Thank you for your input. I'll probably end up seeking a third party solution.
However, I tried looking for the MBUtils.Archive library but couldn't find it. I tried adding MBUtils.dll and Interop.MBUTILSLib.dll to my .NET project (both compiled on 4/7/2005)
When try to access the methods, I do not see Archive as an option. I only see
mbObj.App
mbObj.BinaryFile
mbObj.DateTime
....
Any thoughts
Thanks again!
sample_report.rptdesign
LarryL
Nevermind, I found other DLL's
sawzip.dll
mbarchive.dll
zlib.dll
Thanks
Migrateduser
Just want to point out that any coding you may do against sawzip.dll or mbarchive.dll may not work with future releases. There have been edits to both these dlls to support the latest version of the MediaBin web client, 4.5.3.