How to upload file in background chunk by chunk? - c#

I am making a universal application for windows phone 8.1. I want to upload a file to server in background. Microsoft provides BackgroundUploader class which contains BeginUploadAsync method which uploads whole file in a single request in background.
I want to upload file in chunks to the server. But i am not able to find anyway to upload file in chunks. Is there any alternative?

There is no any built-in support for uploading files "chunk by chunk". If you really need to upload files in a such way, you should split file into parts manually and upload them separately.

Related

Upload Multiple Files Async In C# Winforms App

I have an existing Java REST API that takes a file and passes it along to an S3 bucket for storage.
I've been given a C# Winforms desktop .NET Framework app (4.7). This app needs to take files (around 300+ JPEGs) from a user's specified folder and upload them each independently and asynchronously by calling a Java REST API "upload" endpoint. What is a proper way to make multiple async REST calls to C# so that I can report back to the user as each file gets uploaded and then when all of them have been uploaded?
I've thought about using a Parallel ForEach loop to process all the files and make a REST call for each, but wasn't sure if this was the most efficient approach or if I could properly get the feedback/progress needed as the files get uploaded and finished.

Upload video to Youtube in multiple threads (.NET SDK)

I have made quick prototype using youtubeService.Videos.Insert from Google.Apis.YouTube.v3
The only way I can upload is to pass file stream and hope for the best. I would like to upload it in separate threads (eg in Amazon AWS I can split file on chunks and upload them concurrently). Is it possible?

Upload Multiple Large Files via FTP with Progress Bar using ASP.NET C#

I need to upload large files (>2GB) to a web server, and ASP.NET has a 2GB file upload limit. So what i would like to know is, if its possible to upload files using FTP as i do with HTTP. In other words, is it possible to do an asyncronous (multiple) file upload with progress bar using FTP?
I already have a async file upload with progress bar using a handler (ashx) to send multiple files to a web server. Can i reuse this method to upload file via FTP, or do i need a totally different approach?
As mentioned i need to upload large files to a server, so any other solution that can help me accomplish the task would be much appreciated.
Managed to solve my issue using ResumableJS

How to Extract a Zip file automatically after downloaded

In my web application, user can download a zip file, I want to extract that zip file automatically after downloaded.
I want create a batch file and want to execute that after download is complete in client machine, that will extract zip file automatically.
How to achieve in ASP.Net...
It's almost impossible AMAIK. Because let's see what happens behind the scene. When you send a zip file to your client (User Agent, which in this case is browser), you simply send an HTTP response. From that point onward, you have no control over what happens.
Imagine it was possible. I would wrap up a virus in a zip file. Then I would persuade many victims to click a link for their free gift download, and after downloading I would make it unzip, then run and delete all your favorite songs. It's a security concern.
In general, HTTP and JavaScript are not allowed to do much with file system and host OS. Because you don't know what website you might step on while surfing the Internet.

Write And Read .txt files from FTP with C#

Is it possible to write a txt file on ftp (not upload a file to ftp!) Directly writing a txt file on ftp server) and read from a file on a ftp (not download a file from ftp!) Directly read from a txt file on ftp server? I searched but ı found upload a file and donwload a file with FtpWebRequest class. Note: FTP server uses credentials.
No, it is not possible.
The FTP protocol described in RFC 959 doesn't have any means to achieve what you want.
No, as far as I'm aware, your only option is to download or upload the file. I guess you could short-circuit it a bit by only downloading the file until you got to the part you needed, then aborting. But the whole purpose of FTP is to upload/download FILES, not content.
It's possible with help of third-party virtual file system driver which should be installed in system. There exist third-party applications which let you see the remote FTP location as a virtual disk on your computer. Once the remote FTP location is mounted this way you can use regular file I/O methods to read and write those files. You can create such application as well (not a rocket science with right tools).

Categories