File Drag&Drop from Browser to Browser - c#

My asp.net web application is some kind of "document managment system" saving files in the file system of the server.
The stored files are shown in an asp:ListView control and are downloadable as HTTP- Download. But I also want to drag&drop them into another browser window to upload the draged file to an cloud storeage like dropbox or google drive oslt.
I did some research and I didn't find any solution for this problem. I don't know if this is even possible. Maybe someone has an idea how this could be done?

I am pretty sure you can't have a web application doing that for you because it involves having your web language interacting with your computer, to move a local file to another window or tab in the browser.
It would be similar to have Javascript accessing your local files without the user "help". That is not allowed.
Rather than doing that, why not connect to Google Drive or Dropbox API and make the upload yourself?
In the piece of code where you trigger the download, you could also trigger an upload to the desired service.
Here are the API Documentation for the mentioned services:
https://www.dropbox.com/developers/documentation/http/documentation#file_requests-create
https://developers.google.com/drive/api/v3/manage-uploads

Related

How do I upload file to google drive?

I have checked out tons of links for upload file directly in Google Drive.
I have created a sample application and it's working as expected, but the problem is it's requires the user to login with Google account.
I want to make an web application, where the user who's selecting file can directly upload it to example#gmail.com Google drive. So user don't have to signing with own google account.
How can I achieve a goal?
It's a great help if you have a sample code for this.
Thanks in Advance
As you said, Google Drive needs an account to authenticate and know where to upload the file.
If you want to upload it to a shared place, then create an account for that purpose and use those credentials to log in.
But for your case, if it's not a requirement to use google drive but just a cloud file storage, SmartFile is a lot better for that kind of programs, I'm using it in my own projects and works like a charm, check the Developer account, it gives you 100Gb of space and 200Gb of monthly traffic, and uses a very clean REST api (I have no relatinoship with them, just a happy user).
https://www.smartfile.com/

Uploading files to IIS server

I just wanted to ask is it possible to upload files to IIS server? If it's possible please describe me how to do it, thanks. I've been using google since 1h and i found nothing.
If all you need is file upload to your web server, you could set up FTP on your server
http://www.iis.net/learn/install/installing-publishing-technologies/installing-and-configuring-ftp-7-on-iis-7
If you are looking for a file upload capability for your web application, you can use the FileUpload control. The file would be POSTed to your page once you submit your form. The MSDN page has a an example of how to use the control and save the file on the server side.
Create a web application that has file upload capability
Host the web application in IIS.
Files uploaded will be dropped in your applications folder.
Take a look at for an example of file upload with WebApi: http://blogs.msdn.com/b/henrikn/archive/2012/03/01/file-upload-and-asp-net-web-api.aspx

Use google doc API in asp.net C# web application

I am developing a web application in C#.net. I need to edit a file placed on the server in browser it self(Without downloading it on local machine) and when I save that file, the changes should be reflected in file. For this I want to use google API but I don't know how can I use this.
I want to do like below.
When I click on file name, it should open in browser.
When clicked on edit, it open in edit mode in browser using google doc.
When I save that file, the changes should be reflected in my file which is placed on company server.
How can I do all this thing with google doc API?
Install Google Drive on your server.
Edit the file in Google docs, let Google Drive sync it to the local hard drive.
It is not possible for HTTP protocol, because the basics system doesn;t support it. You can open the file but the file will be downloaded to your local machine in then it will open, you have to specify the MIME type in IIS.
You can use two ways to do a similar job done.
1 By Using FTP
2 Customized solution : Make a page put a text field and load the file (.cs) in it and with submit save it to the file back.
You can embed a google doc in Webpages. But the file would be accessed and saved on Google's servers and not your company server:
Wordpress allows you to do it. Potentially you can see if it possible to do it in a similar way:
http://en.support.wordpress.com/google-docs/
I am not sure if Google has an option of accessing docs from servers outside google's domain.

Upload file directly to azure?

I am writing a webpage that allows users to upload their files to Window Azure Storage.
First I let the user upload their files to my web-server, then I use Window Azure Storage API to upload these files to Window Azure Storage.
How can I let the user upload their files directly to Window Azure Storage without using my web-server as a proxy?
Yes, you can for instance do this using Silverlight as described here: http://blog.smarx.com/posts/uploading-windows-azure-blobs-from-silverlight-part-1-shared-access-signatures
The code at Steve Marx site doesn't work for large upload. I have posted a modified version of the control with cancellations and retries with Silverlight and TPL, also posted at WAZ portal at: Silverlight and TPL based file upload control
The project also has another version of the same control with HTML5 and AJAX.

SilverLight file upload?

I would like to upload file from the client to the server with a Front End in SilverLight.
My problem is that the file is NOT in the isolation storage (that would be easy!).
The application in few word require to upload images from the user computer similar to the file uploaded FaceBook, (the Java version).
Is there a way to grant permission from the user OR a trick that I might not know to be able to upload files?
Thank you
*I do not want to use the Open File Dialog.
If you don't want to use the open file dialog, then I would say that there are no way, if there were, it would be a bug - a security hole in the sandbox.

Categories