Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Uploading File using DMX
Last Post 06/18/2010 11:39 AM by Peter Donker. 1 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
bhagi
New Member
New Member
Posts:1


--
06/17/2010 8:26 AM

 I am new to  DMX Module. Can u provide sample code to upload a file using DMX API in  DNN 5.x version.

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
06/18/2010 11:39 AM
Hi,

Use this function for instance:

Bring2mind.DNN.Modules.DMX.Business.EntriesController.SimplifiedUpload(ByVal PortalId As Integer, ByVal CollectionId As Integer, ByVal File As IO.Stream, ByVal OriginalFilename As String, ByVal Title As String, ByVal User As UserInfo, ByVal BypassSecurity As Boolean)

CollectionId is the EntryId (DMX_Entries table) of the folder where you want it to go
The User is the uploading user. You can use 'Nothing' in which case the Admin will be used but only if you opt to bypass security.
Bypassing security means you do not check if User is allowed to ADD to the folder indicated by CollectionId.


Peter
You are not authorized to post a reply.