.NET CMS
.NET CMS > .NET CMS online support forum > Forum of online support > Configuration

Batch Upload Images

Author
Date & Time
RSS Message Operations
Chris Morgan
male
cmorgan@smarttrader.com.au
Chrismo20227

Info on the Gallery CMS website mentions "Provides a powerful engine for uploading and managing galleries of images, with the ability to BATCH UPLOAD, add/delete/rearrange/ images, group galleries into albums, and more."
I can only see how to upload one image at a time. Please point me in the right direction.
Andrea Bruno
male
customercare@officialguide.info
Webmaster

To begin you must download the latest version of CMS from here: http://sourceforge.net/projects/cmsaspnet/files/la...

You can take as an example the file: uploadphoto.aspx
Otherwise: This sample code creates a child photo-album, into the main tree photo-album:

Dim RootPhotoAlbum As PhotoAlbum = PhotoManager.PhotoAlbum.Load.GetItem(NameRootPhotoAlbum)
If RootPhotoAlbum Is Nothing Then
RootPhotoAlbum = New PhotoAlbum
RootPhotoAlbum.AddPermitted = PhotoManager.Permission.Permitted
RootPhotoAlbum.Deletable = False
RootPhotoAlbum.Save()
End If
Dim PhotoAlbum As PhotoAlbum = RootPhotoAlbum.CreateSubFotoAlbum(CurrentUser(Session), Setting)
PhotoAlbum.IsRoot = True
PhotoAlbum.Editable = PhotoManager.EditablePermission.Author
PhotoAlbum.AddPermitted = PhotoManager.Permission.Author
PhotoAlbum.Deletable = PhotoManager.Permission.None
PhotoAlbum.SubPhotoAlbumsNotCreatable = True
PhotoAlbum.Title(Setting.Language) = "Title of photoalbum"
PhotoAlbum.Save()


This sample code adds a picture to the photo album:

Dim Photo As New PhotoManager.Photo
Photo.Album = PhotoAlbum
If Not String.IsNullOrEmpty(Photo.Album) Then
Photo.FromUrl(ImageUrl) 'In alternative you can load a photo from stream
'Photo.FromStream(Stream) 'You must first open the file and create a stream object
Photo.Title(SubSite.Language) = Author
Photo.Description(SubSite.Language) = Title
Photo.Save()
PhotoID = Photo.NameCode()
Photo.Dispose()
End If


Now in chat
© 2024 http://www.cmsaspnet.com/.NET CMS 5.31