You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//important to override with an "action" (that can be anything), not to cause it to be a default route so MVC will use it default when used with @Ajax.ActionLink and sometimes xforms action url
19
-
22
+
20
23
publicProvider()
21
24
:this("[appDataPath]\\blobs")
22
25
{
@@ -30,54 +33,77 @@ public Provider(String path) :
30
33
base(path)
31
34
{
32
35
}
36
+
33
37
publicoverrideBlobGetBlob(Uriid)
34
38
{
35
39
FileBlobb=base.GetBlob(id)asFileBlob;
36
-
if(HttpContext.Current!=null&&Activated)
37
-
{//then not interested
40
+
if(HttpContext.Current!=null&&Activated&&b!=null)
41
+
{
42
+
//then not interested
38
43
39
44
if(!CheckIfProdServer())// check so it is NOT the PRODUCTION server, lack if multidomain.
40
45
{
41
46
if(!File.Exists(b.FilePath))// check if exist on disc
42
47
{
43
48
FileInfofi=newFileInfo(b.FilePath);
44
-
if(this.RestrictedFileExt.ToLower().IndexOf(fi.Extension.ToLower(),StringComparison.Ordinal)==-1)// check if download this fileextention
if(response.StatusCode==HttpStatusCode.OK)//yeah, sometimes not published or deleted, or wrong url //todo: display default image? no, it may be a temporary error or internet is offline
120
+
if(response.StatusCode==HttpStatusCode.OK
121
+
)//yeah, sometimes not published or deleted, or wrong url //todo: display default image? no, it may be a temporary error or internet is offline
/// Path to blob repository, default is "[appDataPath]\\blobs"
150
182
/// </summary>
151
-
publicnewstringPath
152
-
{
153
-
get;
154
-
internalset;
155
-
}
183
+
publicnewstringPath{get;internalset;}
156
184
157
185
/// <summary>
158
186
/// Url to Production Server where blob should be downloaded
159
187
/// </summary>
160
-
publicstringProdUrl
161
-
{
162
-
get;
163
-
internalset;
164
-
}
188
+
publicstringProdUrl{get;internalset;}
165
189
166
190
/// <summary>
167
191
/// Absolute Url to UrlResolver.ashx on Production Server, default is Provider.DefaultUrl = "modules/Gosso.EPiServerAddOn.DownloadIfMissingFileBlob/UrlResolver.ashx";
168
192
/// </summary>
169
-
publicstringUrlResolverUrl
170
-
{
171
-
get;
172
-
internalset;
173
-
}
193
+
publicstringUrlResolverUrl{get;internalset;}
174
194
175
195
/// <summary>
176
196
/// If the AddOn is activated or not.
177
197
/// </summary>
178
-
publicboolActivated
179
-
{
180
-
get;
181
-
set;
182
-
}
198
+
publicboolActivated{get;set;}
183
199
184
200
185
201
/// <summary>
186
202
/// Restiction to fileextentions NOT do be downloaded. eg ".doc.docx.html.exe"
**Applicable to CMS >9.0 (MVC or Webforms) - tested with CMS9.6.1 and CMS 10.0.1.0, compiled with CMS 9**
6
+
**Applicable to CMS >9.0 (MVC or Webforms) - tested with CMS9.6.1 and CMS 10.0.1.0, compiled with CMS 9**
7
7
8
-
**NOT TESTED with AZURE File Storage or with ImageVault**
8
+
**NOT TESTED with AZURE File Storage**
9
+
10
+
**Work side by side with Imagevault but is not copying vault images**
11
+
12
+
**Compatible with ImageResizer.Plugins.EPiServerBlobReader**
9
13
10
14
## Why?
11
15
Ever restored the Production database to your developer environment and got a website without images? This lightweight AddOn keeps your local environment blob directory up to date.
@@ -80,4 +84,11 @@ Also put the file urlresolver.ashx at that place
**Applicable to CMS >9.0 (MVC or Webforms) - tested with CMS9.6.1 and CMS 10.0.1.0, compiled with CMS 9**
6
+
**Applicable to CMS >9.0 (MVC or Webforms) - tested with CMS9.6.1 and CMS 10.0.1.0, compiled with CMS 9**
7
7
8
8
**NOT TESTED with AZURE File Storage**
9
9
10
10
**Work side by side with Imagevault but is not copying vault images**
11
11
12
+
**Compatible with ImageResizer.Plugins.EPiServerBlobReader**
13
+
12
14
## Why?
13
15
Ever restored the Production database to your developer environment and got a website without images? This lightweight AddOn keeps your local environment blob directory up to date.
14
16
## What is it?
@@ -82,4 +84,11 @@ Also put the file urlresolver.ashx at that place
0 commit comments