Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

file upload without using fileUpload control

Posted on 2006-12-01
7
Medium Priority
?
453 Views
Last Modified: 2008-02-01
I want to give drag drop and upload functionality in my web page.
I have achieved the drag and drop part. Now I have file names in a text box and I want to upload all files listed in the text box without the help of fileUpload control.

Is there any way to read client files into binary streams. I tried to use file:\\\c:\temp\abc.jpg but it reads from the server only.
0
Comment
Question by:param4r
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 12

Expert Comment

by:AmigoJack
ID: 18053174
this is considered hazardous and thus not supported by browsers. think of a website which has javascript code that auto-fills (for example) "C:\autoexec.bat" into the upload-control and then automatically submits the form?

believe me, its better the way its now :) if using uploads via http, the user HAS to use the file-upload controls manually
0
 

Author Comment

by:param4r
ID: 18053218
Thanx AmigoJack,

I understand the limitation.

Is it possible to read data into binary stream from my image control.
0
 
LVL 6

Accepted Solution

by:
nbkbar7 earned 1500 total points
ID: 18053227

AmigoJack is correct. I user interaction is accaptable as in a message confirming that the user wants to allow it you could use this solution...

http://www.experts-exchange.com/Web/Web_Languages/Q_20639591.html?query=javascript+file+upload&clearTAFilter=true
0
Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

 
LVL 12

Expert Comment

by:AmigoJack
ID: 18053303
"into binary stream from my image control"... i dont understand this. with javascript you can change the source of an image of an <image> tag, yes. the upload-functionality doesnt care about images, archives or else...
0
 

Author Comment

by:param4r
ID: 18053373
thanx nkkbar7,

I think solution provided in the url will work for me.

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 18053396
you can write a javascript function (invoked from a button of your choice) which gets the filename from your select box, inserts it in a input tage of type=file, and then submits the form around that input tag (which has to be enctype=multipart/form-data, for obvious reason). You even can have multiple such input tags in that form and so submitt all files at once.
0
 

Author Comment

by:param4r
ID: 18059114
Dear nkkbar7,

The solution provided by you in the url seems to be perfect for my requirement.
But sadly I am not able to use it, my code stops at the line where adodb.stream is trying to load the file from my hard disk

BinaryStream.LoadFromFile("d:\\temp\namrata.jpg");  

the above line is not being executed successfully, can you put some light.

I think if this is sorted out remaing code will not give any problem.

Thanx


0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question