mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
- Moving root media folder to the Media folder under Orchard.Web
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4040871
This commit is contained in:
@@ -166,6 +166,8 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
<Folder Include="Media\Images\" />
|
||||
<Folder Include="Media\Videos\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
|
@@ -106,8 +106,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
<Folder Include="Media\Images\" />
|
||||
<Folder Include="Media\Videos\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
|
@@ -27,8 +27,7 @@ namespace Orchard.Media.Services {
|
||||
public MediaService (
|
||||
IStorageProvider storageProvider) {
|
||||
_storageProvider = storageProvider;
|
||||
//TODO: Module config should decide where is the Media module's root media directory.
|
||||
_rootPath = HttpContext.Current.Server.MapPath("~/Packages/Orchard.Media/Media");
|
||||
_rootPath = HttpContext.Current.Server.MapPath("~/Media");
|
||||
Logger = NullLogger.Instance;
|
||||
}
|
||||
|
||||
@@ -101,7 +100,7 @@ namespace Orchard.Media.Services {
|
||||
}
|
||||
|
||||
public void UploadMediaFile(string folderName, HttpPostedFileBase postedFile) {
|
||||
string targetFolder = HttpContext.Current.Server.MapPath("~/Packages/Orchard.Media/Media/" + folderName);
|
||||
string targetFolder = HttpContext.Current.Server.MapPath("~/Media/" + folderName);
|
||||
if (postedFile.FileName.EndsWith(".zip")) {
|
||||
UnzipMediaFileArchive(targetFolder, postedFile);
|
||||
// Don't save the zip file.
|
||||
@@ -152,8 +151,7 @@ namespace Orchard.Media.Services {
|
||||
do {
|
||||
IStorageFolder parentFolder = folder.GetParent();
|
||||
string parentName = parentFolder.GetName();
|
||||
if (String.Equals(parentName, "Media", StringComparison.OrdinalIgnoreCase) &&
|
||||
String.Equals(parentFolder.GetParent().GetName(), "Orchard.Media", StringComparison.OrdinalIgnoreCase)) {
|
||||
if (String.Equals(parentName, "Media", StringComparison.OrdinalIgnoreCase)) {
|
||||
break;
|
||||
}
|
||||
parentHierarchy.Insert(0, parentName);
|
||||
|
@@ -62,7 +62,7 @@
|
||||
<fieldset>
|
||||
<ol>
|
||||
<li>
|
||||
<img src="<%=ResolveUrl("~/Packages/Orchard.Media/Media/" + Model.RelativePath + "/" + Model.Name)%>" class="previewImage" alt="<%= Model.Caption %>" />
|
||||
<img src="<%=ResolveUrl("~/Media/" + Model.RelativePath + "/" + Model.Name)%>" class="previewImage" alt="<%= Model.Caption %>" />
|
||||
</li>
|
||||
<li>
|
||||
<strong>Dimensions:</strong> 500 x 375 pixels
|
||||
@@ -75,7 +75,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<label for="embedPath">Embed:</label>
|
||||
<input id="embedPath" class="inputText" name="embedPath" type="text" readonly="readonly" value="<img src="<%=ResolveUrl("~/Packages/Orchard.Media/Media/" + Model.RelativePath + "/" + Model.Name)%>" width="500" height="375" alt="<%= Model.Caption %>" />" />
|
||||
<input id="embedPath" class="inputText" name="embedPath" type="text" readonly="readonly" value="<img src="<%=ResolveUrl("~/Media/" + Model.RelativePath + "/" + Model.Name)%>" width="500" height="375" alt="<%= Model.Caption %>" />" />
|
||||
<p class="helperText">Copy this html to add this image to your site.</p>
|
||||
</li>
|
||||
</ol>
|
||||
|
Reference in New Issue
Block a user