i would like the user to be able to drag and drop any file right onto the web form/control/whatever is in the browser and i would want the file to be automatically copied to a specific folder.
is this functionality possible with asp.net?
is there an easier, already existent tool that i can use to do this?
i would also need the feature of the user being able to drag and drop multiple files.
if there is an already existent java solution please let me know!!
please note that i need this to work with IE.
Nothing much to do with ASP.NET
There is a JQuery plugin you can use for drag-n-drop file upload:
JQuery DND File Upload
Take a look at HTML5 Drag and Drop Upload and File API Tutorial for IE (only works in IE9 though)
EDIT:
After a little bit of googling, I found Plupload very interesting. It provides HTML5 Drag and Drop file uploader for supported browsers.
Related
I have hundreds of PDF files that i need to present to users. When presenting these files through my MVC web app i don't want the users to have the ability to download the files, e.g.. i don't want the Acrobat reader controls for print/save showing up. Reading this stackoverflow post it seems that it's not possible to disable those controls.
I know users can still take screen shots and print out the page, but that's not an issue in my case.
What is the best way to go about this. I've reasearched using SWFTOOLS which looks like it may be a good solution, but i dont want to save the swf files to my filesystem. The optimal solution is PDF.js, but another problem i have is users will be accessing the files through IE8 - so PDF.js is out of the question. Unless there is another similar library that will convert the files to HTML 4.
Basically I just need to display the PDF files, on the fly would be best, in a different format than PDF
Any suggestions?
I had a similar project a while back, where sensitive pdfs were needed to be displayed to specific users but they weren't allowed to download/print/save it.
Since it was a web app I ended up using pdf.js. It is Mozilla's PDF renderer for firefox. It renders the pdf on to a canvas and by default has all the bells and whistles. If you have firefox, open a pdf file to see it in action.
It was tough to get it running at first but I ended up using a demo I found online as the base of the project. After removing each functionality that was forbidden the finished product did exactly what was required. You will need to add a print css file to block printing or find a better solution. I ended up using the css approach since print preview by passed my javascript check for the print action. Also ensure you block ctrl + s which allows the user to save the pdf.
Another aspect to note is that it works better on later versions of IE and struggles on older versions as the file size increases. Firefox and chrome are not a problem and I believe its the same for opera although I haven't tested that.
I would convert it to an image file, you can find tools or write script to do it, I personally would do it by displaying them in browser first and then use browser plug-ins to take screenshot of the entire webpage.
(you can automate this)
then just display then converted pdfs
**this is probably not the best solution :( **
I'm currently working on a project where i need to include a application page for users. I need the users to access few .SWF flash games through this page. I created a folder named applications in the Application and imported the .SWF files into that. After that I tried directly linking them using a hyperlink on my page, but they don't seem to open :/
am i missing something? or is there something else i need to do before that?
Would really appreciate it if you can help
Thank you
I don't think you can just hyperlink to your .swf file. According to this site, and your using Dreamweaver or FrontPage, you can just insert it from the Insert menu (or something of the kind). If you aren't using either of those two, you can edit you .swf file in Flash and choose "Export as HTML" from the file menu (or where ever it is) and then just copy the source code of the resulting file to your webpage.
Normally, you should be able to open .swf files directly in your browser, although embedding the swf into your html is often a good idea, you don't have to.
If the url in your address bar shows an adress ending with '.swf' you can test if a swf has loaded by right clicking in your browser window, if you see the flash context menu (zoom in, zoom out, etc) Your swf has loaded.
If your swf has loaded, but nothing else happens, there can be many other reasons for this.
Where did you get the swf game files? If you copied them from another site it's very likely that the swf is supposed to load other files (game assets (images), settings (xml) etc) before the game can be played.
Sometimes the execution of (actionscript) code in a swf is triggered by script in the html page it is embedded in.
It's not entirely clear what you are trying to do....
i write a code using asp.net C# to generate a thumbnail when a video file selected using fileupload control, and display it in gridview. so, what i wanna do is when image in gridview was clicked, it should play the video corresponding to the video where the particular thumbnail is created without involving database?
There must be a Jquery plugin that solves the problem. I know there is many jQuery video plugins out there, just search for it. Why would you involve database? Can't you just include video files in your project and create a link from your images?
I dont know if this will solve your problem but worth checking out:
Simple jQuery video plugin
If you decide to use database I would suggest to keep it simple and use MySQL which is free and easy to setup.
How to go about uploading Multiple files(i have multiple files inside a folder) using file uploader by selecting target folder once in asp.net.if not using file uploader is there any other control for uploading file in asp.net?
You have several options to upload multiple files:
You can use a jQuery plugin, as described here.
You can use as many FileUpload controls as needed, as described here (videotutorial) and here.
But none that I can think of will allow you to select and entire "folder".
Hope it helps.
There is a good explanation of why this is not possible with standard .net controls on Velocity Reviews.
Here's more info on using Flash or Silverlight on StackOverflow. In summary, you can use something that allows multiple files to be uploaded (that the user manually selects) but you can't select a folder and have it upload each item in it, presumably because this breaks a law of the security gods.
You can use Radupload for multiple file upload.
In my current project I have the following situation: A multipage PDF gets rendered by some nasty software into a flash film. My job is to display that rendered flashfilm (will be rendered as file) in my current asp.net application.
I don't know what the rendered flashfilm will look like, but I assume all flash files behave the same? Or are there differences I should know about.
What options do I have to display that flashfilm? Does ASP.net support some built-in object oriented control that allows me to display flashfilm?
You can easily display any flash file by using a plethora of techniques. And it's not built-in, but there are a number of controls and other libraries built by the community to deal with displaying flash content in asp.net, such as Flash Control (http://flash-control.net/)
what you refer to as a flash film is a .swf file. the recommended way to embed .swf files is SWFOBject , a javascript library
http://code.google.com/p/swfobject/
now, i'm no asp specialist , but you may be able to fill the gap between javascript & asp.
hope it helps!