Category "file"

Want to protect file from copy,download

I have following requirement. Admin can upload any files like jpg,pdf,PPT,DOC file on server. End User or viewer only access the files in display/view mode.

Create File object type in TypeScript

I have a function that should only accept JS File objects. How do I create that type in TypeScript? edit: sharing my tsconfig.json { "compilerOptions": {

How to programmatically read xml file inside cab file

Is there any way for me to read contents of an xml file in a cab file in C#? I know how to use XDocument to load an xml file and read its contents, but not sure

Protecting a file by a password [closed]

I have a C# application in which i'd like to create a file : string fileName = "test.txt"; // a sample file name // Delete the fi

Can't download ipynb file

I need to download an ipynb file and so I am trying to set colaboratory as the default app to open (because when I try it says "Please install an app, or if one

Populate jsTree from external JSON file

I've been experimenting with the jQuery.jsTree library and need some help. Please could someone advise me on how to read json_data from an external .json file.

Selenium give file name when downloading

I am working with a selenium script where I am trying to download a Excel file and give it a specific name. This is my code: Is there anyway that I can give th

Trying to connect to wwwroot and get a image

I work in aspnet core mvc technology, I manage to add an image, it does go to wwwroot, but the image does not display well in the browser Example: enter image d

request.FILES always empty on file upload

I am totally stumped on this, and must be doing something incredibly stupid. I am trying to simply upload a file on a Django project. The problem seems to be th

How to download a file from http using C?

I spent the last days trying to figure out how to download a file from an URL. This is my first challenge with socket and I'm using it to have an understanding

merge all files in directory to one text file

In PHP, how can I open everyfile, all text files, in a directory and merge them all into one text file. I don't know how to open all files in a directory, but

How Django set path to files

In a django project, I want to open a file "file.png" (from images folder) in "worker.py". worker.py images file.png otherfile.png It works well using the te

Why can the posix thread id be NULL in Linux kernel function filp_close?

Below is excerpted from linux kernel: /* * "id" is the POSIX thread ID. We use the * files pointer for this.. */ int filp_close(struct file *filp, fl_owner_

How to open file in another directory in java?

How to open a file that is not present in the current directory but in another directory. For example, I have a folder F:/test and my file is in F:/test/test2/d

Java - Getting file from same package

If I want to read from "Words.txt" which is in the same package as the class, how would I do this? Doing simply Scanner = new Scanner(new File("Words.txt")); re

What file extensions can be created/written with Java's Writer write() method?

I have a question about Java streams but I can't seem to find the answer in the documentation: What file formats or extensions can be written with java.io FileW

how does fscanf works with different variable types?

I was looking at the MSDN documentation for fscanf. I tried changing the sample code in the documentation, but it didn't work as I expected. If, for example, I

Adding text and lines to the beginning of a file

I'd like to be able to add lines to the beginning of a file. This program I am writing will take information from a user, and prep it to write to a file. That

Get file size, creation date and modification date in Python

I need to get file info (path, size, dates, etc) and save it in a txt but I don't know where or how to do it. This is what I have: ruta = "FolderPath" os.list

How to 'cut' on null?

Unix 'file' command has a -0 option to output a null character after a filename. This is supposedly good for using with 'cut'. From man file: -0, --print0