In .NET framework filestream exposes a Stream around a file, supporting both synchronous and asynchronous read and write operations. ActionScript 3 for AIR 2 and above also uses FileStream, which supports both synchronous and asynchronous read and write operations.
Questions tagged [filestream]
2638 questions
0
votes
1 answer
How to save a file to disk from RestSharp through Swagger
This question is wee bit similiar to this one and I have used most of the accepted solution including the suggested ResponseTypeFilter.
Specifically my Swagger controller looks like this:
[SwaggerFileResponse(HttpStatusCode.OK, "File…
![](../../users/profiles/2546588.webp)
dansolhe
- 33
- 2
0
votes
1 answer
How to read and write .img files using FileStream in c#?
I am trying to read an image file and write it into a new file. But the written image file is not a supported file. please tell me about what is the proper way to read/write image files. Help me!!
Here is my full code.
And I did not get any…
user12260778
0
votes
2 answers
iis7 website accessed externally downloads files to server instead of local machine
I've a site set up in IIS. It's allows users to download files from a remote cloud to their own local desktop. HOWEVER, the context seems to be mixed up, because when I access the website externally via the IP, and execute the download, it saves the…
![](../../users/profiles/756678.webp)
user756678
- 13
- 6
0
votes
2 answers
How to set FileType on filestream
I'm trying to send a file stream from c# to my js backend. The name and path get send over correctly but the type seems to be missing when I log the file that enters my backend and I absolutely need the filetype but I can't figure out how to pass it…
![](../../users/profiles/10326641.webp)
Mout Pessemier
- 653
- 1
- 7
- 23
0
votes
1 answer
Buffer files to send a filestream to a backend
I'm writing my first custom Activity for a UiPath RPA workflow in which I need to async send a filestream to the backend. This is what I've come up with but I just have this feeling that this doensn't quite work:
class SendFiles :…
![](../../users/profiles/10326641.webp)
Mout Pessemier
- 653
- 1
- 7
- 23
0
votes
1 answer
Stream failing to close C#
I am creating a program which takes passwords and applies an encoding on them onto a file which I have creatively labeled a PASSWORDFILE file. I am a self taught amateur programmer and this is my first time using streams => I'm sorry my code isn't…
![](../../users/profiles/13070964.webp)
Elliot Hodge
- 103
- 4
0
votes
3 answers
How can I lock a file from within a Java application for all other processes on a operating system?
I have a file I need to read several times from. I have to open the InputStream to the same file in sequence. Now I wonder if that file can be locked for the whole os as long as a specific portion of the Java application is running?
I want to…
![](../../users/profiles/5967828.webp)
xetra11
- 4,474
- 6
- 39
- 98
0
votes
1 answer
How can I save a video recorded using MediaRecorder to a file in Asp.NET Core?
By the way, please don't post links to other similar questions because I have seen them all and they don't help. I've been working on this for 7 hours.
So, I'm trying to capture a video from a webcam (using MediaRecorder) and save it to a file (in…
![](../../users/profiles/11872144.webp)
K. Arkadius Wowczuk
- 41
- 5
0
votes
0 answers
How to dispose of temp screen rendering for bitmap.Save(Response.OutputStream, ImageFormat.Jpeg)?
It works draws text of a number and name on a raffle ticket and saves it in the customer's file correctly.
But then returns me = not to the web page but a full black screen with the picture of the ticket.
No way to make it go away and get back to…
![](../../users/profiles/12977081.webp)
All_IN
- 1
- 2
0
votes
1 answer
Need to write out grid 9x9 number text file to a new text file in the same format C++
This is the input file that my output file needs to be the same as
this is the output I currently have (its getting closer)
The first part of the problem that I have completed is to write a method that takes grid text file of 9x9 numbers into a 2d…
![](../../users/profiles/12975555.webp)
LittleCoderBoy
- 3
- 3
0
votes
1 answer
Read binary file from a position in ASP.NET
I want to read a binary file from a particular position. I am using the following code but that is not working.
FileStream fs = new FileStream(filepath, FileMode.Open, FileAccess.Read);
fs.Seek(len,SeekOrigin.Current);
int bytesRead = fs.Read(buf,…
![](../../users/profiles/329755.webp)
Ankit
- 5,983
- 7
- 46
- 74
0
votes
1 answer
Facing Error "Failed to load PDF document." in scala when send pdf file as bytearray in response (scala)
I write the below code for send pdf file as a response, but I stuck at one point it will give an error "Failed to load PDF document."
Code is :
def downloadResumeFile(downloadFilePath: String, response: HttpServletResponse): ResponseEntity[String]…
![](../../users/profiles/6842507.webp)
UNV
- 33
- 6
0
votes
1 answer
How to select all files of a SQL Server database from blob folder?
I have a SQL Server database.
You can use the following script to create similar database:
CREATE DATABASE [test]
CONTAINMENT = NONE
ON PRIMARY
(NAME = N'test', FILENAME = N'C:\Program Files\Microsoft SQL…
![](../../users/profiles/364429.webp)
isxaker
- 6,265
- 6
- 48
- 77
0
votes
0 answers
Reading in from txt file when format changes
I'm trying to create an Instruction Set Simulator that reads in assembly and executes the desired action. Each line consists of [address][instruction][input1] and possibly also [input2]
The file I'm reading looks like this:
10 MOV R1, 1
11 MOV…
![](../../users/profiles/9378722.webp)
BCool
- 3
- 2
0
votes
0 answers
Write a file to the beginning of a specific sector of a hard drive
I am trying to write a file to a HDD but at a specific sector, I get have no data being wrote. Its about 1.5GB, Shouldnt I see activity right away?
using (FileStream stream = new FileStream("/Resources/MyFileName.NoExt", FileMode.Open)) // Grab…