Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryURL direct to "Upload a File" pageURL direct to "Upload a File" page
Previous
 
Next
New Post
9/12/2008 2:23 PM
 

I want to have a extenal link to go to "Upload a File" page directly, i.e. user do not need to click the "Upload" button in Repository module.   Is possible to do that? 

BTW, I am using version 3.01.15

 
New Post
9/13/2008 7:55 AM
 

No, I don't think that is possible. The Upload form is a module 'control', which is kinda like a 'view' of the main module. Without changing the source code to look for a particular querystring parameter and loading the Upload control, I don't think there's a way out of the box to do what you want.

 
New Post
9/14/2008 10:52 PM
 

Hi Steve,

Thanks for your reply.  I have another trouble now.  See if you or somebody can give me some light.

I want to create a page for uploading only.  And the repository module is still run side by side.  The uploaded file is upload to current repository module.

Here is what I am trying:

I create a new Module, named formUpload.  I copy the code from  form.ascx and form.ascx.vb to my formUpload and then modify.  The new module shows up.  But the page can't valid.  The FileName box and TextEditor always invalid: "A File is Required" and "You must enter a Description".  When I change the Page.IsValid = False, I did see Title, Name, Email, Categories, Attributes and Show email checkbox were entered to database but the Filename, image filename and description are empty.  What could be wrong?  I also remove all cache in my machine to test it.  But the result was same.  Please help.

 

 
New Post
9/15/2008 11:41 AM
 

It seems a persit HtmlInputFile value and TextEditor value problem.  The page will be reloaded after "Upload" button is clicked.  Then the "CreateInputform()" was called in Page_load.   But the original code in form.ascx.vb is just like that.  What's wrong?  Please help. 

Here is my modified page_load():

        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            ' Get original repository module ID
            Me.LocalResourceFile = Me.LocalResourceFile.Replace("form_Upload", "Upload")
            RepositoryModuleID = CInt(Localization.GetString("RepositoryModuleID.Text", Me.LocalResourceFile))
            oRepositoryBusinessController.SetRepositoryFolders(RepositoryModuleID)

            'Dim fname As String = oRepositoryBusinessController.LocalResourceFile
            ' Obtain PortalSettings from Current Context
            Dim objModules As New ModuleController

            ' Determine ItemId of Document to Update
            If Not (Request.Params("ItemId") Is Nothing) Then
                itemId = Int32.Parse(Request.Params("ItemId"))
            End If

            ' make sure the user got here from an upload button and not
            ' directly via pasting a URL into the browser address
            'If Request.Params.Item("HTTP_REFERER") Is Nothing Then
            '       Response.Redirect(NavigateURL("Access Denied"), True)
            'End If

            oRepositoryBusinessController.SetRepositoryFolders(RepositoryModuleID)
            ' create the input form from the form.html/form.xml templates for the current skin
            LoadformTemplate()

            If itemId <> -1 Then
                objRepository = m_RepositoryController.GetSingleRepositoryObject(itemId)
            Else
                objRepository = New DotNetNuke.Modules.Repository.RepositoryInfo
            End If

            CreateInputform()
            If Not Page.IsPostBack Then
            End If

            If Not Page.IsPostBack Then
                'v13wstat3("_returnURL") = Request.UrlReferrer.AbsoluteUri
                v13wstat3("_returnURL") = NavigateURL()
            End If

        End Sub

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryURL direct to "Upload a File" pageURL direct to "Upload a File" page


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out