Questions tagged [file-type]
The type of a file, as characterized by the format of the data it contains, or its use case. Specifies how bits are used to encode information.
830
questions
0
votes
0
answers
21
views
How to write vim script to continuously move to the next window until window has a specific filetype in vim?
for example I have multiple windows in a vim instance:
+---+---+---+
| | | |
| A | | |
| | | |
+---+---+---+
Different window has different filetypes, some are plugins (NvimTree/...
-1
votes
1
answer
34
views
Should certain files not be stored in GIT [closed]
I am having to switch from SVN to GIT and am wondering if there are certain file types or other rules that should be followed regarding what is stored in GIT. Previously I was always told that Binary ...
2
votes
1
answer
41
views
What 's the reason of Ruby IO stream in Windows powershell file type encoding
I have a strangeness problem. In Windows7 operation system,I try to run the command in powershell.
ruby -E UTF-8 -e "puts 'どうぞよろしくお願いします,Mr Jason'" > test.txt
When I read test.txt file:
...
0
votes
0
answers
39
views
How to change key type from text to file like in Postman but in Insomia?
Aloha,
Question: How to change the key type from text to file like in Postman but in Insomnia?
Reference From Postman
Problem: Cannot test POST on localhost:8080/predict/upload.
Reason: Testing back-...
0
votes
0
answers
18
views
arXiv not recognizing tex file as a tex file (type unknown)
I'm trying to upload a paper to arXiv and it's not recognizing one of my tex files as a tex file
When I try to process it like this, I get a general error message suggesting I check my file types.
...
0
votes
2
answers
90
views
Wrong file type when sending PDF files through Whatsapp API using Postman
I am trying to send a message to myself containing a PDF file stored in Onedrive through Whatsapp API but I am getting the following jpg format:
Message in Whatsapp APP
Oddly enough, when I check ...
0
votes
0
answers
24
views
Python-magic not recognized while trying to import in Django
I am trying to check the file type of the uploaded data using magic but pylance is not recognizing it
I keep getting this error pylance error
I installed python-magic 0.4.27
My python version is- 3.9
...
0
votes
0
answers
32
views
*p or *t doesn't get applied in accept attribute of Input tag in Angular
I am trying for users to be able to view only those file types or extensions that I specify in accept attribute of Input tag. Like in below screenshot. FileTypes
I am providing
<input
...
0
votes
1
answer
300
views
Vim/Neovim spellcheck not working with markdown files (but works with normal text files)
If I open or create a file with no extension (no filetype) or with a .txt extension (filetype=text), the spellcheck functionality works as expected. For example:
Open/create a file: $ nvim ...
0
votes
0
answers
8
views
unknown avacab archive file format
I've come across a .bin file that is not a .bin file, accompanying documents suggest that it is actuall an "avacab format" but searching for avacab gives very little information. Is anyone ...
0
votes
0
answers
47
views
Error while adding IOS *.caf file as if application/octet-stream
I am trying to upload a file (sample1.caf) downloaded on the following page:
https://filesamples.com/formats/caf
While downloading, I check the file type and let upload to continue if the file type is ...
2
votes
0
answers
247
views
How can I resolve ESM / require error using TS 4.8?
I use Node.js application and TS 4.8, and I updated package file-type, but now my project compilation fails with error
[1] const _fileType = /#PURE/ _interopRequireWildcard(require("file-type&...
0
votes
0
answers
19
views
changing file names using the modified date and file type
I would like to rename all my photos and videos, to do this I would like to use both the;
date modified time stamp
file type
(fyi, i am doing this so I can sort my sort the files chronologically)
I ...
0
votes
0
answers
142
views
Convert HDF5 file to Parquet file in Python
I want to convert a hdf5 file h5 to parquet format.
import h5py
import numpy as np
import pandas as pd
import pyarrow as pa
import pyarrow.parquet as pq
import tables
h5 = "...
0
votes
1
answer
30
views
How to set a pre-defined path as inital path in argparse filebrowser type?
With the below command I can create a file browser and view the files. But how can I give a default directory path to open every time in the below command? I am looking for an equivilant command as ...
0
votes
0
answers
114
views
How do you make an app on MacOS with PyInstaller that has a file type that automatically opens as a variable in the app?
I am trying to build a MacOS app in python using PyInstaller with a custom file type ".kes" associated with it. My goal is to make it so that when a user opens a file with that ends with ....
0
votes
0
answers
7
views
C# convenient way to detect type remote file is mp3 or mp4 [duplicate]
I have an Azure Function solution I'm implementing that takes some json from a 3rd party API, gets the urls from it (and other data) and either transfers the file to Vimeo as a video file, or to Azure ...
0
votes
0
answers
18
views
Strange type of file appli
I created a script to upload files on the server and store the filetype and filename on mysql database.
When i try to upload file via php script it works with image files.
In mysql database some files ...
1
vote
1
answer
49
views
autocmd does not detect *.ott files
I'd like to have syntax highlighting on files with the .ott extension (using ott-vim), but I am not getting any colors when opening a file, even though filetype=ott is set. Re-setting set filetype=ott ...
1
vote
2
answers
214
views
How can I restrict file types and make my code more secure?
I'm brand new to Flask and attempting to make a secure file upload web app. I want to limit the file types that can be uploaded and specifically block scripting languages.
My app.py code:
from flask ...
3
votes
1
answer
236
views
goland check file type for xlsx
Go standard library facility to check file type for xlsx file gives something like this
import (
"fmt"
"log"
"net/http"
"os"
)
func main() {
...
1
vote
1
answer
349
views
Check if a file is of a given type
How can I fix this function? I think that I have to convert the name to String but then I would have to convert it back to str to use ends_with. Should I use another function to do that?
use walkdir::{...
0
votes
0
answers
120
views
Unable to import 'file-type' package
I downloaded this package from https://www.npmjs.com/package/file-type
And when I try to import it in my react App.js:
import {fileTypeFromFile} from 'file-type';
It gives the following error:
@ ./...
0
votes
0
answers
488
views
How do I get excel file format correct with ExcelJS and FileSaver?
I am trying to write a function in my front end app that downloads an Excel template file, using the ExcelJS and FileSaver libraries together. It successfully causes a file to be downloaded. However,...
0
votes
1
answer
112
views
how to check if a file is either a video type, image type or a document type in php
I am trying to perform an action if a certain file is of a certain type; image, video or document.
What I have tried so far:
if(preg_match("/\.(mp4|mov)$/", $filename))
and
$videoType = ...
1
vote
0
answers
40
views
Which file type is this? (similar to JSON)
Which file type is this? It kind of looks like JSON but it is missing the : (colons) and , (commas)
"guidedata"
{
"Hero" "alchemist"
"Title" &...
0
votes
0
answers
68
views
Delete specific image file types
Suppose I wanted to delete specific type files, like JPEG images across specific slides; not sure how to go about this; this what I'm using:
Dim osld As Slide
Dim opic As Shape
Dim lngCount As ...
2
votes
2
answers
2k
views
Flutter: Image Picker Package. Limiting to only JPEG, JPG, & PNG Files to be Selectable
I'm thinking about using the image picker package for my app. The thing is that I only want the user to be allowed to select images that are of type JPEG, JPG, or PNG. Is there a way to go about doing ...
1
vote
1
answer
347
views
How to read an Unsigned Char image file to Python?
I have an text file called with the extension '.image', at the top of the file is the following:
Image Type: unsigned char
Dimension: 2
Image Size: 512 512
Image Spacing: 1 1
Image Increment: 1 1
...
0
votes
0
answers
19
views
Why does All Files filetypes in Python Tkinter produce a syntax Error with "* .*"? 'unicodeescape' codec can't decode bytes in position 2-3 [duplicate]
I tried to make my first bigger python project to learn python. It should be a text editor but I struggle with the filedialog to open a file. I did a lot of research here and elsewhere on the internet,...
0
votes
1
answer
65
views
How to save webpage as it's extension
I want to save a webpage as it's specific extension. If I try to do Ctrl + S, there are only two options. HTML, and Mime HTML.
But say the page is http://example.net/foo/bar.aspx. I would like to save ...
1
vote
1
answer
13k
views
The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
I'm trying to upload a file (pdf/jpg) using a Lambda function written in NodeJS by triggering the request from Postman but I'm getting the following error:-
2022-02-02T15:09:51.135Z 743939db-7511-...
-1
votes
1
answer
61
views
Is there a function similar to ncdisp to view .npy files?
Is there a function similar to ncdisp in MATLAB to view .npy files?
Alternatively, it would be helpful to have some command that would spit out header titles in a .npy file. I can see everything in ...
0
votes
0
answers
42
views
How does one open .LMF files in python?
I am currently using Visual Studio Code with a virtual environment and would like to open some .LMF files containing data. I have found Python LMF library and have installed it with pip in the Visual ...
0
votes
1
answer
190
views
Is there any way I can try to read files with suffix like '.sas7bdat', '.dta', '.sav' and '.xpt' by using JAVA?
I am working on a module, which can import different kinds of files(currently those file types are SAS output format). Of course, this module is written by java, springboot. The main logic is that ...
1
vote
0
answers
38
views
New FileType is ignored in most cases in InteliJ Plugin
I have created the following class
public class LineageFileType implements FileType {
@Override public @NonNls @NotNull String getName() {
return "Lineage File";
}
@...
0
votes
1
answer
133
views
Explicitly set Javascript files mimetype
As I am pretty new to React, need help, please.
I have encountered a use case where the client is uploading a javascript file in the project but upload fails because different browsers see the same ...
0
votes
0
answers
70
views
Is this possible to change the keywords 2,3,4 colors for custom language in intellij
Hey is it possible to change the keywords for 2,3 and 4 in a custom language without making a plugin ?
I know I can do it for keyword 1 here :
But there are no option for other keywords. For example ...
1
vote
1
answer
125
views
Detect if a given file is gzip or TarGzip
Given a file, using the magic sequence, I can detect with compression type it belongs to.
But magic sequence for gzip and tarGzip is the same.
So, how can I differentiate between these 2 file types.
...
1
vote
1
answer
2k
views
How to check type of files using the header file signature (magic numbers)?
By entering the file with its extension, my code succeeds to detect the type of the file from the "magic number".
magic_numbers = {'png': bytes([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, ...
1
vote
0
answers
193
views
how to get mime type by magic numbers with flutter mime package
I failed to send a video file with an extension mp4 to backend because backend detected it as a bin file as the mime type return as application/octet-stream when backend checking the mime type.
I do ...
1
vote
2
answers
591
views
htaccess - Deny access to pdf files in folders
The goal is to restrict direct browser access to all *.pdf various subfolders within a main folder. The subfolder names in which each pdf file reside are numeric only (characters 0-9; Eg. "work/...
-2
votes
1
answer
81
views
Is there a way to set up AVPlayer without specifying filetypes?
I am using a TableViewController to list content of multiple filetypes, say ".mov" and ".wav".
I want to open these files in AVPlayer. However, I can only get these to play if I ...
1
vote
1
answer
2k
views
If picked file name have no extensions, how we will get file mime type in flutter
I'm using file picker for my application. In that, I want to know picked file mime type even file name has no extension. How it is possible?
0
votes
1
answer
785
views
file-type: extract mime type
I am using the file-type package (https://www.npmjs.com/package/file-type) to determine the mime type of a file from a buffer. The function returns a promise, and I would like to extract only the mime ...
0
votes
1
answer
94
views
How to get the Linux file type (regular, durector, symlink, char device, etc) in .NET?
There are 7 different types of files in Linux:
1. - : regular file
2. d : directory
3. c : character device file
4. b : block device file
5. s : local socket file
6. p : named pipe
7. l : symbolic ...
0
votes
1
answer
249
views
PE/ELF executable file format- Malware sample Execution
I have downloaded some malware samples both in Linux and Windows VM. when I check file type of the samples in Linux using file * command, the type is displayed as PE32 executable. However, when I ...
-1
votes
2
answers
103
views
Is there an audio file format that doesn't contain metadata, so individual chunks can be split up at any position and just be saved to a file?
Is there an audio file format, where I can save all the individual chunks (recorded in javascript) while splitting them up at any point to save them to different files and have them still all playable?...
0
votes
1
answer
98
views
What would be a good separator look like for a file containing multiple MP4 files?
I am currently trying to make my own file format by simply merging the binary data from multiple video files (.mp4, AVC, AAC to be exact) and separating this data with a separator that my Python ...
0
votes
1
answer
364
views
Provide a magic database to libmagic
I've a simple C code that returns the filetype of the given file. I can give it any filename from the command line, and it will return the filetype:
#include <magic.h>
#include <stdio.h>
...