473,231 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

Uploading a directory instead of a file

If i go as follows:

<asp:FileUpload ID="dirTemp" runat="server" Width="400px" /><br />

The element i create is requiring me to select a file. Can i use this
control to point out a directory? Is there another one?

--
Konrad Viltersten
Jun 27 '08 #1
8 1168
Not really - as it needs to render at the client via html; there is an
<input type="file" ...>, but nothing similar for folders. If you are
happy to use client-side controls (OCX, or possibly silverlight etc) you
might be able to do more (look at sharepoint's "upload multiple" for
example) - but otherwise it depends on the user - for example, are they
savvy enough to zip a folder and upload the zip? It depends on the user:
a developer is probably fine with this; a visitor to "Ma's bake
sale.org" - probably not.

Marc
Jun 27 '08 #2
Not really - as it needs to render at the
client via html; there is an
<input type="file" ...>
but nothing similar for folders. If you
are happy to use client-side controls
(OCX, or possibly silverlight etc) you
might be able to do more...
Unfortunately i'm not at such liberty. It
strikes me as awfully strange that such a
facility hasn't been implemented, though...

--
Regards
Konrad Viltersten
--------------------------------
sleep - a substitute for coffee for the poor
ambition - lack of sense to be lazy

Jun 27 '08 #3
1: User chooses directory they wish to upload.
2: Create directory on the server.
3: Recurse through all the files in the directory on the user-end
4: For each file, upload.

This would be in the code-behind of course.
"K Viltersten" <tm**@viltersten.comwrote in message
news:op***************@lp028.pagero.local...
If i go as follows:

<asp:FileUpload ID="dirTemp" runat="server" Width="400px" /><br />

The element i create is requiring me to select a file. Can i use this
control to point out a directory? Is there another one?

--
Konrad Viltersten

Jun 27 '08 #4
On May 6, 3:25 pm, "Lucid" <lu...@phreak2000.comwrote:
1: User chooses directory they wish to upload.
2: Create directory on the server.
3: Recurse through all the files in the directory on the user-end
4: For each file, upload.

This would be in the code-behind of course.

"K Viltersten" <t...@viltersten.comwrote in message

news:op***************@lp028.pagero.local...
If i go as follows:

<asp:FileUpload ID="dirTemp" runat="server" Width="400px" /><br />

The element i create is requiring me to select a file. Can i use this
control to point out a directory? Is there another one?

--
Konrad Viltersten
Does JS let you "3: Recurse through all the files in the directory on
the user-end "???
Jun 27 '08 #5
1: User chooses directory they wish to upload.
2: Create directory on the server.
3: Recurse through all the files in the
directory on the user-end
4: For each file, upload.

This would be in the code-behind of course.
Good scheme but how would one do item 1? The
only way to select the directory i've found
this far is to type it in into a text box.
That method will be very error prone...

--
Regards
Konrad Viltersten
--------------------------------
sleep - a substitute for coffee for the poor
ambition - lack of sense to be lazy

Jun 27 '08 #6
On Tue, 06 May 2008 21:17:32 -0700, K Viltersten <tm**@viltersten.com>
wrote:
>1: User chooses directory they wish to upload.
2: Create directory on the server.
3: Recurse through all the files in the directory on the user-end
4: For each file, upload.
This would be in the code-behind of course.

Good scheme but how would one do item 1?
Granted, you're asking an ASP question in a general C# newsgroup, so this
might not apply to you. But there's the FolderBrowserDialog class.

Pete
Jun 27 '08 #7
>>1: User chooses directory they wish to upload.
>>2: Create directory on the server.
3: Recurse through all the files in the directory on the user-end
4: For each file, upload.
This would be in the code-behind of course.

Good scheme but how would one do item 1?

Granted, you're asking an ASP question in a general C# newsgroup, so
this might not apply to you. But there's the FolderBrowserDialog class.
Hehe, this is awkward... I _THOUGHT_ it was an ASP.NET group. :)

It must be the switch of my news client, i geuss... You info was, as you
very accurately anticipated, not of much use in my case. But that's my
fault, of course. Sorry for that and thanks!

Konrad Viltersten
Jun 27 '08 #8
On Wed, 07 May 2008 00:00:26 -0700, K Viltersten <tm**@viltersten.com>
wrote:
Hehe, this is awkward... I _THOUGHT_ it was an ASP.NET group. :)
Not a hard mistake to make, as there are a few ASP.NET experts (well, they
seem expert to me anyway :) ) who do answer ASP questions here.

But, glad to help redirect you...I hope you get a better answer from the
correct newsgroup. :) I would hope that, assuming there's any sort of
common file dialog support at all in ASP.NET, they'd include an equivalent
to the folder browser dialog.

Pete
Jun 27 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: dickiedyce | last post by:
Hi there. I've spent the weekend getting ever more frustrated, trying to get an upload file function working on a website. The site is hosted by a company called oneandone. They're using PHP...
9
by: R. Rajesh Jeba Anbiah | last post by:
Q: How should I handle file upload? A: File uploading requires HTML form of content type "multipart/form-data". The file content has to be POSTed/submitted via the form and once the file is...
1
by: Jason Gleason | last post by:
I'm trying to set up an http upload program that has almost identical code to the following page: ...
13
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming...
4
by: VB Programmer | last post by:
I know how to upload an individual file to a server (See below code snippet). QUESTION: Is there an easy way to upload an entire subdirectory and all it's files? Or, do I have to loop thru the...
5
by: Chris | last post by:
I have a meetings section I'm developing on our intranet. Using PHP/MySQL. Meeting info and Meeting docs reside on 2 related tables in the db. Users may want to upload anywhere from 1 to 10 or...
4
by: Mukesh | last post by:
Hi all I am trying to upload and save as a picture to "root/Photos" folder in my web application. I am using this code to perform this task DirectoryInfo strFolder = new...
1
by: ali | last post by:
I am writing a script which uploads file to a specific directory; I am using javascript to handle client side exceptions and php script which actually performs file uploading. Php scripts gets...
8
by: K Viltersten | last post by:
I'd like to allow a user to point out a directory. There's facility for pointing to a file, FileUpload, but there's nothing to get the path to a given folder. How can that be solved (Silverlight is...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.