snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.98k stars 3.17k forks source link

File type must be CSV. Uploaded file is application/octet-stream #10387

Open MarkRyank opened 2 years ago

MarkRyank commented 2 years ago

Debug mode

Describe the bug

Hi team, i just move our snipe-it from centos to windows, then the same CSV file cannot upload from webpage.

Reproduction steps

  1. use the same .CSV file upload
  2. centos7 with snipe-it 4.9.x successful
  3. Windows 2016 snipe-it 5.2 and 5.3.3 all failed.

Expected behavior

looks like Windows IIS MIME propblem, but i have no idea to chceck

Screenshots

1

Snipe-IT Version

5.3.3

Operating System

Windows server 2016

Web Server

IIS

PHP Version

7.4.26

Operating System

No response

Browser

Chrome

Version

94

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

fresh install.

welcome[bot] commented 2 years ago

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

viclou commented 2 years ago

+25131 in FD

snipe commented 2 years ago

How did this CSV get generated? Snipe-IT doesn't attempt to set the mime-type of any uploaded files, but it does try to validate them before accepting them. octet-stream is usually a fallback format for when the server doesn't know what file type it is, so knowing how you created this CSV would be very helpful.

VinnyPolar commented 1 year ago

snipe it manages to generate a csv report for download and we can only edit it and in this link https://snipe-it.readme.io/docs/importing there is a download template but the error persists even using the template

Snipe-IT Documentation
Importing Assets and More
There is a Web GUI importer available in the Import section that will allow you to upload and process and import a comma-delimited CSV through the web interface. The importer may choke on larger imports, so if you have more than several hundred records to import, you may wish to use the command-line...
VinnyPolar commented 1 year ago

I noticed that when we download the model made available on the official website and immediately upload it the way we downloaded the snipe it allows but if we edit and save it on our pc it no longer allows uploading