Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Maximum ASP
  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  Sponsors  

Meet Our Sponsors

SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Getting file path
Previous Previous
 
Next Next
New Post 4/17/2006 4:24 PM
User is offline yoni go
149 posts
9th Ranked


Getting file path 
 

Hi,
In my module i allow my user to upload file with the urlControl module (comes with DNN).
Then i want to get the full path of file the user just uploaded (virtual path include folders).
I noticed that the table 'files' contain all the files in the system,
I there an api to get the file path or file name (when i have the file id)?

Thanks.

 
New Post 4/17/2006 5:33 PM
User is offline William Severance
847 posts
www.wesnetdesigns.com
7th Ranked






Re: Getting file path 

Most of the core modules that make use of the DNN FileSystem include in their SQL stored proceedures that get an object or collection of objects a join between the column which stores the file link (in the form of "fileid=23") and the DNN core Files table so that an actual or relative file path can be returned.  You can also obtain a FileInfo object which includes the Filename, Folder, etc. by way of the FileController class:

Dim fctrlr As New DotNetNuke.Services.FileSystem.FileController
Dim finfo As DotNetNuke.Services.FileSystem.FileInfo = fctrlr.GetFileById(FileId, PortalId)
Dim relativeFilepath As String = System.IO.Path.Combine(fi.Folder, fi.FileName)

Note that you also have to supply the PortalId to the GetFileById method.

 


Bill, WESNet Designs
 
New Post 4/17/2006 5:36 PM
User is offline cathal connolly
2757 posts
www.cathal.co.uk
5th Ranked










Re: Getting file path 

something like this should get you there

   Dim objFileController As New FileController
Dim objFileInfo As FileInfo = objFileController.GetFileById(fileId, PortalId)

strFullPathAndFilename = PortalSettings.HomeDirectoryMapPath & objFileInfo.Folder & objFileInfo.FileName

Cathal

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Getting file path
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Adaptive InfoSystems, Inc.
We provide custom programming and various levels of support for DotNetNuke and the .Net framework.
www.aisysweb.com
Multipartner Virtual Data Rooms
The Virtual Data Rooms (VDR) provided by an expert advisor, far from any ordinary software company!, supporting the sellers and their consultants. Multipartner builds and services higly professional Virtual Data Rooms (VDR) specifically tailored to M&A, Real Estate and NPL deals.
www.multipartner.com
DNN SEO
Seablick Consulting specializes in DNN search engine optimization (SEO), DNN consulting, as well as support & training.
seablick.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP