Skip to content

Commit 8797047

Browse files
committed
Upgrade to vs2010, don't show filesystem-hidden files; notes
1 parent 63dc118 commit 8797047

File tree

6 files changed

+42
-108
lines changed

6 files changed

+42
-108
lines changed

README

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ TODO:
44
=====
55
- Ability to add placeholders for required dependencies (like the components of a .ism file)
66
- Callbacks for current status (for post-upload processing, like transcodes)
7-
- Section divisions by classifications (different targets, like documents, videos etc)
7+
- Section divisions by classifications (different targets, like documents, videos etc)
8+
- Look at http://html5doctor.com/native-drag-and-drop/ for IE9 file drop?

jQueryFileUpload.sln

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
Microsoft Visual Studio Solution File, Format Version 10.00
3-
# Visual Studio 2008
2+
Microsoft Visual Studio Solution File, Format Version 11.00
3+
# Visual Studio 2010
44
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "jQueryFileUpload", "jQueryFileUpload\jQueryFileUpload.csproj", "{35500359-0CBA-4BFC-BAB6-319D14988AB9}"
55
EndProject
66
Global

jQueryFileUpload/FileTransferHandler.ashx.cs

+6-12
Original file line numberDiff line numberDiff line change
@@ -144,20 +144,14 @@ private void DeliverFile (HttpContext context) {
144144
}
145145

146146
private void ListCurrentFiles (HttpContext context) {
147-
var FileList = new List<FilesStatus>();
148-
149-
/*var files =
147+
var files =
150148
new DirectoryInfo(StorageRoot)
151-
.GetFiles("*", SearchOption.TopDirectoryOnly)
152-
.Where(f=>f.Attributes.HasFlag(FileAttributes.Hidden));*/
153-
154-
var names = Directory
155-
.GetFiles(StorageRoot, "*", SearchOption.TopDirectoryOnly);
156-
157-
foreach (var name in names)
158-
FileList.Add(new FilesStatus(new FileInfo(name)));
149+
.GetFiles("*", SearchOption.TopDirectoryOnly)
150+
.Where(f => !f.Attributes.HasFlag(FileAttributes.Hidden))
151+
.Select(f => new FilesStatus(f))
152+
.ToArray();
159153

160-
string jsonObj = js.Serialize(FileList.ToArray());
154+
string jsonObj = js.Serialize(files);
161155
context.Response.AddHeader("Content-Disposition", "inline, filename=\"files.json\"");
162156
context.Response.Write(jsonObj);
163157
context.Response.ContentType = "application/json";

jQueryFileUpload/Web.config

+10-80
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,12 @@
11
<?xml version="1.0"?>
22
<configuration>
3-
<configSections>
4-
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
5-
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
6-
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
7-
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
8-
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
9-
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
10-
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
11-
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
12-
</sectionGroup>
13-
</sectionGroup>
14-
</sectionGroup>
15-
</configSections>
16-
<appSettings>
17-
<add key="StorageRoot" value="C:\temp\"/>
18-
</appSettings>
19-
<connectionStrings/>
20-
<system.web>
21-
<compilation debug="true">
22-
<assemblies>
23-
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
24-
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
25-
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
26-
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
27-
</assemblies>
28-
</compilation>
29-
<httpRuntime maxRequestLength="2097151" executionTimeout="360"/>
30-
<pages>
31-
<controls>
32-
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
33-
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
34-
</controls>
35-
</pages>
36-
<httpHandlers>
37-
<remove verb="*" path="*.asmx"/>
38-
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
39-
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
40-
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
41-
</httpHandlers>
42-
<httpModules>
43-
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
44-
</httpModules>
45-
</system.web>
46-
<system.codedom>
47-
<compilers>
48-
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
49-
<providerOption name="CompilerVersion" value="v3.5"/>
50-
<providerOption name="WarnAsError" value="false"/>
51-
</compiler>
52-
</compilers>
53-
</system.codedom>
54-
<system.webServer>
55-
<validation validateIntegratedModeConfiguration="false"/>
56-
<modules>
57-
<remove name="ScriptModule"/>
58-
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
59-
</modules>
60-
<handlers>
61-
<remove name="WebServiceHandlerFactory-Integrated"/>
62-
<remove name="ScriptHandlerFactory"/>
63-
<remove name="ScriptHandlerFactoryAppServices"/>
64-
<remove name="ScriptResource"/>
65-
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
66-
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
67-
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
68-
</handlers>
69-
</system.webServer>
70-
<runtime>
71-
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
72-
<dependentAssembly>
73-
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
74-
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
75-
</dependentAssembly>
76-
<dependentAssembly>
77-
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
78-
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
79-
</dependentAssembly>
80-
</assemblyBinding>
81-
</runtime>
82-
</configuration>
3+
<appSettings>
4+
<add key="StorageRoot" value="C:\temp\"/>
5+
</appSettings>
6+
<connectionStrings/>
7+
<system.web>
8+
<compilation debug="true" targetFramework="4.0"/>
9+
<httpRuntime maxRequestLength="2097151" executionTimeout="360"/>
10+
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
11+
</system.web>
12+
</configuration>

jQueryFileUpload/jQueryFileUpload.csproj

+18-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
23
<PropertyGroup>
34
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
45
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -10,7 +11,13 @@
1011
<AppDesignerFolder>Properties</AppDesignerFolder>
1112
<RootNamespace>jQueryUploadTest</RootNamespace>
1213
<AssemblyName>jQueryUploadTest</AssemblyName>
13-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
14+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
15+
<FileUpgradeFlags>
16+
</FileUpgradeFlags>
17+
<OldToolsVersion>3.5</OldToolsVersion>
18+
<UpgradeBackupLocation />
19+
<UseIISExpress>false</UseIISExpress>
20+
<TargetFrameworkProfile />
1421
</PropertyGroup>
1522
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1623
<DebugSymbols>true</DebugSymbols>
@@ -20,6 +27,7 @@
2027
<DefineConstants>DEBUG;TRACE</DefineConstants>
2128
<ErrorReport>prompt</ErrorReport>
2229
<WarningLevel>4</WarningLevel>
30+
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
2331
</PropertyGroup>
2432
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2533
<DebugType>pdbonly</DebugType>
@@ -28,17 +36,18 @@
2836
<DefineConstants>TRACE</DefineConstants>
2937
<ErrorReport>prompt</ErrorReport>
3038
<WarningLevel>4</WarningLevel>
39+
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
3140
</PropertyGroup>
3241
<ItemGroup>
3342
<Reference Include="System" />
34-
<Reference Include="System.Core">
35-
<RequiredTargetFramework>3.5</RequiredTargetFramework>
36-
</Reference>
37-
<Reference Include="System.Web.Extensions">
38-
<RequiredTargetFramework>3.5</RequiredTargetFramework>
39-
</Reference>
43+
<Reference Include="System.Data.DataSetExtensions" />
4044
<Reference Include="System.Web" />
4145
<Reference Include="System.Configuration" />
46+
<Reference Include="System.Web.ApplicationServices" />
47+
<Reference Include="System.Web.DynamicData" />
48+
<Reference Include="System.Web.Entity" />
49+
<Reference Include="System.Web.Extensions" />
50+
<Reference Include="System.Xml.Linq" />
4251
</ItemGroup>
4352
<ItemGroup>
4453
<Content Include="Default.aspx" />
@@ -79,7 +88,7 @@
7988
<Folder Include="App_Data\" />
8089
</ItemGroup>
8190
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
82-
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" />
91+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
8392
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
8493
Other similar extension points exist, see Microsoft.Common.targets.
8594
<Target Name="BeforeBuild">

jQueryFileUpload/scripts/jquery.fileupload.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -607,10 +607,10 @@
607607
var that = e.data.fileupload,
608608
dataTransfer = e.dataTransfer = e.originalEvent.dataTransfer;
609609
if (that._trigger('dragover', e) === false) {
610-
return false;
611-
}
612-
if (dataTransfer) {
613-
dataTransfer.dropEffect = dataTransfer.effectAllowed = 'copy';
610+
return false;
611+
}
612+
if (dataTransfer && dataTransfer.dropEffect) {
613+
dataTransfer.dropEffect = /*dataTransfer.effectAllowed =*/ 'copy';
614614
}
615615
e.preventDefault();
616616
},

0 commit comments

Comments
 (0)