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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...How to delete a file after upload (URL control)How to delete a file after upload (URL control)
Previous
 
Next
New Post
9/30/2008 11:27 PM
 

Sorry to make you more work - I appreciate it!


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
10/1/2008 1:36 AM
 

Sebastian, I think I have found a bug in the control that only allows the SuperUser account to upload. When it uploads to the Temp or Main folder it does a IsInRole check to see if it has "Write" perms. When I was debugging I noticed that the writeRoles (see below) was always "" (even tho Admin and Reg Users have read and write on my folders).

Dim writeRoles As String = GetRoles(root + UploadFolder, settings.PortalId, "WRITE")

The SuperUser ignores the Folder Role perms and always returns true, hence they can always upload, but a normal admin cannot.

The reason it is blank is because it is passing the whole root and Folder name into the GetRoles method whereas the Folder dictionary is stored as FolderName only (with a "\" on the end). Hence it was looking for "F:\DotNetNuke_4.3.1_Source\Website\Portals\POKER\Leagues" in the Folder dic but not finding it (it is stored as "Leagues\" in this example.

Here is the fix but I am curious as to why this was not spotted before - perhaps I have configured it wrong earlier in the process? Have you tried uploading with any role other than Host?

Dim writeRoles As String = GetRoles(UploadFolder + "/", settings.PortalId, "WRITE")

 


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
10/2/2008 4:39 AM
 

One more point to note - when you use Enable Partial Rendering on the page which hosts the control it falls over because this line is null:

Dim postedFile As HttpPostedFile = CType(FindControl("fileUpload"), HtmlControls.HtmlInputFile).PostedFile

My solution is to turn off partial rendering but just letting you know ;)


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
10/16/2008 6:24 AM
 

Sebastian Leupold wrote

Hi Rodney,

I will need to have a look into the source code myself the next days to answer your questions.

Hi Sebastian, just checking if you've had a moment to look at this please?


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...How to delete a file after upload (URL control)How to delete a file after upload (URL control)


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