I'm building a small web video player app for a school project. I'm using a C# Web Service, and an SQL server. My idea was to upload a video, then save its location and name at an SQL table and update the client accordingly.
I know that files can be uploaded through AJAX by sending formdata with XHR, but how do I actually receive them in the web service and save them in a designated path?
in case you'd like to implement a wcf service i think this article fits your needs
File Upload using WCF REST API and JavaScript
Related
I am creating a MVC web application with Docusign REST API.
I am going to create actionlink in index view for each record witch downloads
document in the record's envelope.
I am planning to use call following HTTP request.
GET /v2/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}
When I call this request, I get pop up where I can choose location and name of file for the document that I am downloading.
Is there any way for me to pass folder location and name of file as parameter and download the file without getting this pop up?
I don't think Docusign does not provide such API to download in this way.
Thank you in advance.
A Web Server can not access the client's computer. Imagine if Google (or any other site) could just start programs on your machine when you visit their site! So popup has nothing to do with DocuSign.
So using DS API, you will get pdf as byte[], once you got byte[] then its your code who has to write it to a File and that is not possible on a WEBServer as WebServer will not be able to access the CLient's computer to directly save them on the machine without showing that popup. If you run below code in Standalone Java Application or I think Java Applets can also do it, then you can use FileOutputStream to write byte[] into a file directly in the machine.
I am using the YouTube API to upload videos from my ASP.net web application to YouTube.
I have used this example:
https://developers.google.com/youtube/v3/code_samples/dotnet#upload_a_video
I have got this working on my Loacl PC where I can upload a video. To get this working I obtained a "Client ID for native application" from the Google Developer Console and downloaded the required json.
However I have now uploaded my website to a live server and wish to get it working.
I have now generated a "Client ID for web application" and replaced the json file that I was using.
Is this all I have to do?? Because I have tried this and my file is not appearing on YouTube.
Here are the IDs that I have generated.
I have simply used the web application JSON instead of the native one.
I am architecting an application and need your inputs please:
Asp.net web application calls a WCF service that is running as windows service.
user can log into asp.net website and select a text file and save it in the Database.
Should it be a job of WCF service to take the file from user's machine, save on the server and then read the file locally and save in the database? or, should asp.net website upload the file and send a job to wcf service to load a local file into server?
thanks.
If it were me, I would use option 2: using ASP.NET to retrieve the file, then in code behind, calling the WCF service to actually save/retrieve the file from the database.
I have to create service that can get files from any authorized source and save them on file server. Then return back response with url for that resource.
The issue is that the service could be accessible from any web site or app. In case of Web site, what would be the best way to get file from a user and stream it to the service? Or do i have to save it to the web server first and then replay the stream to the service? I am thinking of creating Httphandler to channel traffic from web server (the instant file upload request is initiated by user) to the service. Would that be the best approach, or what would?
I have just implemented file transfer service for our internal use. It was a trivial service to implement that with WCF RESTFul way. What you need to do is to implement streaming over Http.
Actually, I have chosen new WCF Web Api to achieve this feature.
But if you are familiar with that, here you can see a good example on how you can implement this :
http://blogs.msdn.com/b/gblock/archive/2010/11/24/streaming-over-http-with-wcf.aspx
I'm currently building a web page that will serve customers with files relevant for products they bought from us. The web server is located on a remote web host, but the files I want to serve are located on a local FTP server.
Right now the client logs on to the web host and, depending on its credentials on the web page, receives a file listing from the corresponding account on our local FTP server. The client can download the files because I'm directing the link directly to the FTP server. However, I want to change that so that it is the web host that is serving the file, not the FTP server (but I obviously don't want to store the files on the web host).
So, upon request the web app should fetch a certain file from the FTP server (using SSL, I might add) and then forward it to the client via HTTP (not SSL).
Also, it would be freaking awesome if the client can start receiving the file immediately from buffer while it is being fetched from FTP :P
How can I do it?
I am not sure of the reasons you want to do this since it unnecessarily adds a lot of intermediate layers and work, but if you still want to then use the FTP request client in .NET, buffer the file you want to serve and then simply open the response stream from your web application to serve this buffer directly via your web application.
It is a lot of unnecessary work for your web server instead of simply saving these files in a protected folder on the web server itself.