It looks like you're new here. If you want to get involved, click one of these buttons!
using System;
using System.Web;
using System.IO;
public class Upload : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
HttpPostedFile file = context.Request.Files[\"Filedata\"];
string targetDirectory = Path.Combine(context.Request.PhysicalApplicationPath, context.Request[\"folder\"].Replace(\"/\",\"\"));
string targetFilePath = Path.Combine(targetDirectory, file.FileName);
// Uncomment the following line if you want to make the directory if it doesn't exist
//if (!Directory.Exists(targetDirectory)) Directory.CreateDirectory(targetDirectory);
file.SaveAs(targetFilePath);
context.Response.Write(\"1\");
}
public bool IsReusable
{
get { return false; }
}
}
using System;
using System.Web;
using System.IO;
public class Upload : IHttpHandler {
public void ProcessRequest(HttpContext context) {
HttpPostedFile oFile = context.Request.Files[\"Filedata\"];
string sDirectory = HttpContext.Current.Server.MapPath(@context.Request[\"folder\"]);
oFile.SaveAs(sDirectory + oFile.FileName);
if (!Directory.Exists(sDirectory)) Directory.CreateDirectory(sDirectory);
context.Response.Write(\"1\");
}
public bool IsReusable {
get { return false; }
}
}
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
Dim httpFile As HttpPostedFile
If (Not context.Request.Files(\"Filedata\") Is Nothing) Then
httpFile = context.Request.Files(\"Filedata\")
Dim iFileLength As Integer = httpFile.ContentLength
If (iFileLength <> 0) Then
Dim targetDirectory As String = \"c:\\"
Dim targetFilePath As String = Path.Combine(targetDirectory, httpFile.FileName)
' Uncomment the following line if you want to make the directory if it doesn't exist
If (Not Directory.Exists(targetDirectory)) Then
Directory.CreateDirectory(targetDirectory)
End If
httpFile.SaveAs(targetFilePath)
context.Response.Write(\"1\")
End If
End If
End Sub
public class Upload : IHttpHandler
{
public void ProcessRequest(HttpContext context) {
HttpPostedFile oFile = context.Request.Files[\"Filedata\"];
if (oFile != null) {
const string sDirectory = \"c:\\\";
if (!Directory.Exists(sDirectory))
Directory.CreateDirectory(sDirectory);
oFile.SaveAs(Path.Combine(sDirectory, oFile.FileName));
context.Response.Write(\"1\");
}
else {
context.Response.Write(\"0\");
}
}
public bool IsReusable {
get {
return false;
}
}
}
$('#fileUpload').uploadify({
'uploader': '/_layouts/js/uploadify/uploadify.swf',
'script': '/_layouts/other/Upload.ashx',
'cancelImg': '/_layouts/js/uploadify/cancel.png',
'auto': true,
'onError': function(event, queueID, fileObj, errorObj) {
alert('error');
},
'onComplete': function(event, queueID, fileObj, response, data) {
alert('complete');
}
});
oFile.SaveAs(sDirectory + oFile.FileName);
oFile.SaveAs(sDirectory + \"/\" + oFile.FileName);
dhulting said:In response to mark.rawlingson's post:
The script works, but it has a missing / between the Directory and the filename.
I changed this line:oFile.SaveAs(sDirectory + oFile.FileName);
to this:oFile.SaveAs(sDirectory + \"/\" + oFile.FileName);
and all works great!
cheap Gucci sneakers cheap Gucci sneakers;
Gucci sneakers for men Gucci sneakers for men;
Gucci sunglasses on sale Gucci sunglasses on sale;
Nike Running Shoes Men Nike Running Shoes Men;
Nike Free Run 2 Nike Free Run 2;
Nike Running Shoes Women Nike Running Shoes Women;
Nike Free 3.0 Nike Free 3.0;
Chanel Sunglasses Chanel Sunglasses;
Prada Sunglasses Prada Sunglasses;
Coach Sunglasses Coach Sunglasses;
Christian Louboutin Shoes Christian Louboutin Shoes;
Christian Louboutin Men Spikes Shoes Christian Louboutin Men Spikes Shoes;
Jeremy Scott Wings Shoes, Adidas Originals x Jeremy Scott JS Wings Denim, Adidas Originals By Jeremy Scott x 2NE1 JS Wings Shoes
cheap Gucci sneakers cheap Gucci sneakers;
Gucci sneakers for men Gucci sneakers for men;
Gucci sunglasses on sale Gucci sunglasses on sale;
Nike Running Shoes Men Nike Running Shoes Men;
Nike Free Run 2 Nike Free Run 2;
Nike Running Shoes Women Nike Running Shoes Women;
Nike Free 3.0 Nike Free 3.0;
Chanel Sunglasses Chanel Sunglasses;
Prada Sunglasses Prada Sunglasses;
Coach Sunglasses Coach Sunglasses;
Christian Louboutin Shoes Christian Louboutin Shoes;
Christian Louboutin Men Spikes Shoes Christian Louboutin Men Spikes Shoes;
Mens leather-based Louis Vuitton belts on sale could be a amazing drawing minute card to the girls, making various other men inside the room feel inexperienced with envy of your modern physical appearance. Ferragamo belts on sale often add the perfect effect into a good ensemble which requires finish with a hit. The particular Burberry belts for men can be costly or custom, but the key factor is to get an exceptional belt that suits you and would likely last for years. A new male' cheap Gucci belts for men is just like his tuxedo. It must suits you, and should work for a lifetime.
A lot of the success of a business can also be related to its failures, downsides, problems and even it's depressions. Influence this is the tale of Gucci belts on sale as their official brand is "The Property of Gucci". Years after it's establishment, Cheap Gucci Men T-shirts is enjoying the great popularity of the company which is widely known across the globe. Any kind of Gucci Outlet Shop, where cheap Gucci sunglasses for men products are offered, is ranking proof for the brand's tremendous popularity. These kinds of stores let people to get Gucci men shoes on sale products without paying big quantities, like in classic department stores, stores and stores. But before cheap Gucci men watches arrived at the pinnacle involving success that it stands within today, this went through several brave and turbulent undertakings discount Gucci women handbags have for some reason directly as well as indirectly caused its all round success.
Gucci shoes for men are definitely one of the longest running fashion houses in the world, and they are very recognisable by the double 'G' logo you find on all of their Gucci belts on sale. From handbags to cheap Gucci men T-shirts and just about every piece of clothing in between, Gucci sneakers has always produced high quality products that you are proud to wear. As with other designers, Gucci hats on sale products tend to run on the high side, but if you want to look your best cheap Gucci handbags that will stand the test of time - and the changes in fashion trends - Gucci is the designer you want to stock your closet with Louis Vuitton Handbags on sale.
Today, increasing numbers of people are dressing the cheap Gucci belts seeing as there are no guidelines anymore in relation to your accessories. Don't be puzzled if your Gucci belts for men has snaps that gives the actual choice to change your Gucci belts for cheap along with accessorize your current outfit. Much of your more common belts have a permanent belt buckle that does not have Gucci belts on sale or even accessibility to eliminate the buckle. The best and most flexible belts are the ones giving you the use of changing your Louis Vuitton belts for cheap so you now have a choice as to which usually buckle you would want to wear. Regardless of what the trend or perhaps latest fashion is, a conventional cheap Louis Vuitton belts can be able to keep track of changing when you can swap out your buckle buckle. An individual wearing the Louis Vuitton belts sale can make a dramatic statement. There is everything from the logo of your respective favorite auto, sport, or design towards the ritzy and fancy Louis Vuitton belts for men. There are many great designs on the market that can add a lot of persona to your strip. A gear buckle could be worn as being Gucci hats for sale put right in the center of your waistline. Laced through the strip loops, the particular belt ties together together in the center of your Louis Vuitton men short T-shirts midsection and the lift on the back side in the buckle is put comfortably to the hole in the belt that suits accordingly cheap Gucci sunglasses on sale. And then wow! You have the buckle shown proudly and now your on your way.
Today, increasing numbers of people are dressing the cheap Gucci belts seeing as there are no guidelines anymore in relation to your accessories. Don't be puzzled if your Gucci belts for men has snaps that gives the actual choice to change your Gucci belts for cheap along with accessorize your current outfit. Much of your more common belts have a permanent belt buckle that does not have Gucci belts on sale or even accessibility to eliminate the buckle. The best and most flexible belts are the ones giving you the use of changing your Louis Vuitton belts for cheap so you now have a choice as to which usually buckle you would want to wear. Regardless of what the trend or perhaps latest fashion is, a conventional cheap Louis Vuitton belts can be able to keep track of changing when you can swap out your buckle buckle. An individual wearing the Louis Vuitton belts sale can make a dramatic statement. There is everything from the logo of your respective favorite auto, sport, or design towards the ritzy and fancy Louis Vuitton belts for men. There are many great designs on the market that can add a lot of persona to your strip. A gear buckle could be worn as being Gucci hats for sale put right in the center of your waistline. Laced through the strip loops, the particular belt ties together together in the center of your Louis Vuitton men short T-shirts midsection and the lift on the back side in the buckle is put comfortably to the hole in the belt that suits accordingly cheap Gucci sunglasses on sale. And then wow! You have the buckle shown proudly and now your on your way.
Men's cheap Gucci belts have invariably been an important part of mens fashions. You can see that the younger generation provides moved faraway from being Gucci belts for men in. However the saggy pants look has yet to find the cheap Gucci shoes outlet in history and you have a lot of young men walking around in needy need of Gucci belts sale but simply is not going to put one on. For most generations the actual cheap Gucci baseball hats produced the ensemble. Men's belts were created in a variety of resources and colors. Always with natural leather as the favored accessory cheap Louis Vuitton belts.
Have you ever wondered the way the dickens to remove your current Gucci belts for cheap as well as replace it with all the beautiful brand new belt gear you just received? This could be a new most complicated problem if you're planning on changing the particular Gucci belts on sale over a belt with your knowledge made with a perpetual buckle available. However, compatible cheap Louis Vuitton belts buckles tend to be fashioned with metallic loop around the back from the buckle, as well as a metal prong extending perpendicularly from the back of the gear, as well. The Louis Vuitton belt for men, in turn, is usually made of heavier leather-based, with no less than two (Only two) functioning steel snaps at one end where the leather-based belt may be slipped with the metal trap of the Hermes belts on sale.
To begin, eliminate the old gear buckle. First, lay your own cheap Gucci belts for men, facedown. Locate the particular discount Louis Vuitton belts on sale button snaps behind your buckle place. Pull back about the short gear part to be able to unsnap don't be shy -- they are designed to unsnap! Then unfold the buckle, lay that flat and slide your buckle from the cheap Hermes belts.
Subsequent, in the identical, but change, way refit the belt with a brand new cheap Gucci T-shirts for men Take your brand new belt clasp and place it facedown with the metal loop closest to the gear end that contain the Gucci sunglasses on sale. Slide this specific end with the belt from the metal cycle of the buckle until the buckle loop reaches the prior collapsed section of the Louis Vuitton hats for cheap. Now crease this buckle section back to its initial position, match the snaps and click them with each other - Snap! And Voila! The new men Louis Vuitton polos for cheap has become secure on your belt!