Skip to content

Commit

Permalink
Merge pull request #129 from nspcc-dev/fix/128-content_type_is_broken
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-khimov authored Feb 5, 2025
2 parents a1b36ee + cbfe6ce commit 3eba223
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Home = ({
const handleAllFiles = (files: any) => {
const unsupportedFiles: any[] = [];
for (let i = 0; i < files.length; i += 1) {
if (['application/javascript', 'text/javascript', 'application/xhtml+xml', 'text/html', 'text/htmlh'].indexOf(files[i].type) === -1) {
if (['application/javascript', 'text/javascript', 'application/xhtml+xml', 'text/html', 'text/htmlh', 'application/x-javascript'].indexOf(files[i].type) === -1) {
handleFile(files[i], i === (files.length - 1));
} else {
unsupportedFiles.push(files[i].name);
Expand Down Expand Up @@ -119,7 +119,7 @@ const Home = ({
'Email': user.XAttributeEmail,
}),
'X-Neofs-Expiration-Duration': lifetimeData,
'Content-Type': file.type === '' ? 'application/octet-stream' : '',
'Content-Type': file.type === '' ? 'application/octet-stream' : file.type,
}).then((res: any) => {
res['filename'] = file.name;
setUploadedObjects((uploadedObjectsTemp: UploadedObject[]) => [...uploadedObjectsTemp, res]);
Expand Down

0 comments on commit 3eba223

Please sign in to comment.