FileImage is NULL

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
9/22/2013 12:00:58 AM
Gravatar
Total Posts 9

FileImage is NULL

In the Store, when I upload a product for download fulfillment, the FileImage field is NULL.

 

Looking in the database, the Filename is there, the correct ByteLength is there, but the actual file never seems to make it to the database.

FileName                   FileImage ServerFileName              ByteLength
MIDImageSetup.exe  NULL       bunchastuffinhere.config 1469232

You can imagine how that just errors out when downloading...

Something I'm not doing correctly?

Dan

mojoPortal Version2.3.9.8 MSSQL
Operating System Microsoft Windows NT 6.0.6002 Service Pack 2
ASP.NET Info v4.0.30319 Running in Full Trust
 

9/22/2013 6:26:37 AM
Gravatar
Total Posts 18439

Re: FileImage is NULL

That field is not used, it is/was for possible future use, the file is not stored in the database, it is stored on disk under /Data/Sites/[SiteID]/webstoreproductfiles

​The real name of the file is stored in the db but the file is stored on disk using a guid name and a.config extension so it cannot be accessed by an http request, but for users who are authorized the file can be downloaded by binary writing it to the response stream and will be restored to its original file name.

Hope that helps,

Joe

9/22/2013 7:51:31 AM
Gravatar
Total Posts 9

Re: FileImage is NULL

I believe Homer Simpson put it best when he said "D'oh!"

​Thanks.

9/22/2013 8:15:06 AM
Gravatar
Total Posts 9

Re: FileImage is NULL

So, in a Handler,  I should use Server.MapPath to get the file?

 

 

9/23/2013 6:15:07 AM
Gravatar
Total Posts 18439

Re: FileImage is NULL

You could, Server.MapPath resolves a virtual path to a file system path.

One good thing about an open source project like mojoPortal is that there is lots of example code for anything you might want to do. In this case you could study the code from the webstore download page to see how we do it.

You must sign in to post in the forums. This thread is closed to new posts.