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 ForumsRepositoryRepositoryHow to use an SWF as the image fileHow to use an SWF as the image file
Previous
 
Next
New Post
12/10/2008 8:41 PM
 

I'm trying to use an SWF as the image file in the repository. The SWF as the image file lets us build a simple multiple thumbnail gallery for that place and then the download is high resolution version of the same images. But we cannot upload an SWF as the image file even when it is an allowed file type in host settings -> advanced -> other.

Is there any way to pull this off without modifying the code and recompiling?

 
New Post
12/16/2008 8:25 PM
 

OK - so I take it the only way to do this is to mod the code. Anyone have familiarity with the code to point me to the right spot to find the upload file type check?

It seems like it would be a good idea to be able to set the allowed upload types either from the portal settings or at least from repository settings.

 
New Post
12/17/2008 1:09 AM
 

The code you need to change is in the RepositoryBL.vb file, in the UploadFile() function... here's the lines you need to change.

' make sure that if there's an image being uploaded that it's only a JPG, GIF or PNG
If strImageExtension <> "" Then
  If strImageExtension.ToLower() <> "jpg" And strImageExtension.ToLower() <> "gif" And strImageExtension.ToLower() <> "png" Then
    strMessage += Services.Localization.Localization.GetString("TheFile", Me.LocalResourceFile) & " " & objImageFile.FileName & " Is A Restricted File Type for Images. Valid File Types Include JPG, GIF and PNG<br>"
  End If
End If
 
New Post
1/6/2009 7:31 PM
 

OK - so I followed the instructions on "HOW TO: Making code changes and recompiling Repository 3.X" and I have gotten nothing but headaches and build errors and no closer to this simple change I need. After a couple of weeks of trial and error, I have the DNN site working, installed the source of the Repository module and can open the solution in VS2003 and find the exact place in the code where I need to add "AND strImageExtension.ToLower() <> "swf"". Building the solution is another matter. I get build errors galore (153 of them). I even got frustrated to the point that I tried looking through the DLL with a HEX editor looking for the place to change "png" to "swf" hoping maybe I would get lucky and be able to swap out png's for swf's.

So is there anyone out there who has a working setup to compile this code that can make this change? I'm sure it is a 5 minute job to add "AND strImageExtension.ToLower() <> "swf"" into RepositoryBL.vb and compile to get a new DLL. I would be ETERNALLY grateful! All I need is this one little change for a new DLL to solve a huge problem that has been nagging and consuming my time for a month!

Please respond if you are willing and able...

 

 
New Post
1/6/2009 8:15 PM
 

Added "SWF" as a valid image type to the latest development build.

You can download it here.
http://www.gooddogs.com/dotnetnuke/Downloads/tabid/100/i/7/v/10/Default.aspx

Please read the DISCLAIMER at the bottom of the page before downloading and installing any development build.

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryHow to use an SWF as the image fileHow to use an SWF as the image file


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