ilhamdev commited on
Commit
014fd3a
·
verified ·
1 Parent(s): 04c5d14

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +112 -112
index.js CHANGED
@@ -821,118 +821,118 @@ try {
821
  const file = File.fromURL(url);
822
  await file.loadAttributes();
823
  let data = await file.downloadBuffer();
824
- mime.types['py'] = 'text/x-python'; // Python
825
- mime.types['java'] = 'text/x-java-source'; // Java
826
- mime.types['c'] = 'text/x-c'; // C
827
- mime.types['cpp'] = 'text/x-c++src'; // C++
828
- mime.types['cc'] = 'text/x-c++src'; // C++
829
- mime.types['cxx'] = 'text/x-c++src'; // C++
830
- mime.types['cs'] = 'text/x-csharp'; // C#
831
- mime.types['php'] = 'application/x-httpd-php'; // PHP
832
- mime.types['rb'] = 'text/x-ruby'; // Ruby
833
- mime.types['pl'] = 'text/x-perl'; // Perl
834
- mime.types['sh'] = 'application/x-sh'; // Shell Script
835
- mime.types['go'] = 'text/x-go'; // Go
836
- mime.types['swift'] = 'text/x-swift'; // Swift
837
- mime.types['kt'] = 'text/x-kotlin'; // Kotlin
838
- mime.types['rs'] = 'text/x-rustsrc'; // Rust
839
- mime.types['scala'] = 'text/x-scala'; // Scala
840
- mime.types['r'] = 'text/x-r-source'; // R
841
- mime.types['R'] = 'text/x-r-source'; // R (alternatif untuk huruf besar)
842
- mime.types['lua'] = 'text/x-lua'; // Lua
843
- mime.types['md'] = 'text/markdown'; // Markdown
844
- mime.types['json'] = 'application/json'; // JSON
845
- mime.types['js'] = 'application/javascript'; // JavaScript
846
- mime.types['ts'] = 'application/x-typescript'; // TypeScript
847
- mime.types['xml'] = 'application/xml'; // XML
848
- mime.types['yaml'] = 'application/x-yaml'; // YAML
849
- mime.types['yml'] = 'application/x-yaml'; // YAML (alternatif)
850
- mime.types['html'] = 'text/html'; // HTML
851
- mime.types['htm'] = 'text/html'; // HTML (alternatif)
852
- mime.types['css'] = 'text/css'; // CSS
853
- mime.types['scss'] = 'text/x-scss'; // SCSS (Sass)
854
- mime.types['sass'] = 'text/x-sass'; // Sass
855
- mime.types['less'] = 'text/x-less'; // Less
856
- mime.types['coffee'] = 'text/coffeescript'; // CoffeeScript
857
- mime.types['dart'] = 'application/dart'; // Dart
858
- mime.types['sql'] = 'application/sql'; // SQL
859
- mime.types['vb'] = 'text/x-vbscript'; // VBScript
860
- mime.types['vbs'] = 'text/x-vbscript'; // VBScript (alternatif)
861
- mime.types['bat'] = 'application/x-msdos-program'; // Batch script
862
- mime.types['cmd'] = 'application/cmd'; // Command script
863
- mime.types['ps1'] = 'application/x-powershell'; // PowerShell script
864
- mime.types['ini'] = 'text/plain'; // INI file
865
- mime.types['toml'] = 'application/toml'; // TOML
866
- mime.types['cfg'] = 'text/plain'; // Configuration file
867
- mime.types['conf'] = 'text/plain'; // Configuration file
868
- mime.types['properties'] = 'text/plain'; // Properties file
869
- mime.types['log'] = 'text/plain'; // Log file
870
- mime.types['yml'] = 'application/x-yaml'; // YAML file
871
- mime.types['rst'] = 'text/x-rst'; // reStructuredText
872
- mime.types['latex'] = 'application/x-latex'; // LaTeX
873
- mime.types['tex'] = 'application/x-tex'; // TeX
874
- mime.types['bib'] = 'text/x-bibtex'; // BibTeX
875
- mime.types['mat'] = 'application/x-matlab-data'; // MATLAB
876
- mime.types['m'] = 'text/x-matlab'; // MATLAB or Objective-C
877
- mime.types['octave'] = 'text/x-octave'; // GNU Octave
878
- mime.types['rmd'] = 'text/x-r-markdown'; // R Markdown
879
- mime.types['jl'] = 'text/x-julia'; // Julia
880
- mime.types['clj'] = 'text/x-clojure'; // Clojure
881
- mime.types['cljs'] = 'text/x-clojurescript'; // ClojureScript
882
- mime.types['cljc'] = 'text/x-clojure'; // Clojure (Common)
883
- mime.types['erl'] = 'text/x-erlang'; // Erlang
884
- mime.types['hs'] = 'text/x-haskell'; // Haskell
885
- mime.types['lhs'] = 'text/x-literate-haskell'; // Literate Haskell
886
- mime.types['ml'] = 'text/x-ocaml'; // OCaml
887
- mime.types['mli'] = 'text/x-ocaml'; // OCaml Interface
888
- mime.types['fs'] = 'text/x-fsharp'; // F#
889
- mime.types['fsi'] = 'text/x-fsharp'; // F# Interactive
890
- mime.types['fsx'] = 'text/x-fsharp'; // F# Script
891
- mime.types['fsscript'] = 'text/x-fsharp'; // F# Script (alternative)
892
- mime.types['elm'] = 'text/x-elm'; // Elm
893
- mime.types['elm'] = 'application/elm'; // Elm (alternative)
894
- mime.types['ex'] = 'text/x-elixir'; // Elixir
895
- mime.types['exs'] = 'text/x-elixir'; // Elixir Script
896
- mime.types['eex'] = 'text/x-eex'; // Elixir Embedded Templates
897
- mime.types['html.eex'] = 'text/x-html-elixir'; // Elixir HTML Embedded Templates
898
- mime.types['hx'] = 'text/x-haxe'; // Haxe
899
- mime.types['hxml'] = 'application/hxml'; // Haxe XML
900
- mime.types['sml'] = 'text/x-sml'; // Standard ML
901
- mime.types['thy'] = 'text/x-isabelle-theory'; // Isabelle Theory
902
- mime.types['lean'] = 'text/x-lean'; // Lean
903
- mime.types['v'] = 'text/x-verilog'; // Verilog
904
- mime.types['sv'] = 'text/x-systemverilog'; // SystemVerilog
905
- mime.types['vhd'] = 'text/x-vhdl'; // VHDL
906
- mime.types['vhdl'] = 'text/x-vhdl'; // VHDL (alternative)
907
- mime.types['scm'] = 'text/x-scheme'; // Scheme
908
- mime.types['ss'] = 'text/x-scheme'; // Scheme (alternative)
909
- mime.types['rkt'] = 'text/x-racket'; // Racket
910
- mime.types['lisp'] = 'text/x-common-lisp'; // Common Lisp
911
- mime.types['asd'] = 'text/x-common-lisp'; // Common Lisp ASDF
912
- mime.types['cl'] = 'text/x-common-lisp'; // Common Lisp (alternative)
913
- mime.types['el'] = 'text/x-emacs-lisp'; // Emacs Lisp
914
- mime.types['sc'] = 'text/x-supercollider'; // SuperCollider
915
- mime.types['f'] = 'text/x-fortran'; // Fortran
916
- mime.types['f90'] = 'text/x-fortran'; // Fortran (alternative)
917
- mime.types['f95'] = 'text/x-fortran'; // Fortran (alternative)
918
- mime.types['v'] = 'text/x-vim'; // Vim Script
919
- mime.types['pro'] = 'text/x-prolog'; // Prolog
920
- mime.types['pl'] = 'text/x-prolog'; // Prolog (alternative to Perl)
921
- mime.types['p'] = 'text/x-pascal'; // Pascal
922
- mime.types['pas'] = 'text/x-pascal'; // Pascal (alternative)
923
- mime.types['d'] = 'text/x-d'; // D
924
- mime.types['ada'] = 'text/x-ada'; // Ada
925
- mime.types['adb'] = 'text/x-ada'; // Ada Body
926
- mime.types['ads'] = 'text/x-ada'; // Ada Specification
927
- mime.types['nim'] = 'text/x-nim'; // Nim
928
- mime.types['nimble'] = 'text/x-nim'; // Nimble
929
- mime.types['cr'] = 'text/x-crystal'; // Crystal
930
- mime.types['cl'] = 'text/x-clarion'; // Clarion
931
- mime.types['prg'] = 'text/x-clarion'; // Clarion Program
932
- mime.types['l'] = 'text/x-lex'; // Lex/Flex
933
- mime.types['yy'] = 'text/x-bison'; // Bison/Yacc
934
- mime.types['bison'] = 'text/x-bison'; // Bison/Yacc (alternative)
935
- mime.types['mly'] = 'text/x-menhir'; // Menhir
936
  let {fileTypeFromBuffer} = await (await import('file-type'))
937
  return res.json({
938
  message:"Success",
 
821
  const file = File.fromURL(url);
822
  await file.loadAttributes();
823
  let data = await file.downloadBuffer();
824
+ mimes.types['py'] = 'text/x-python'; // Python
825
+ mimes.types['java'] = 'text/x-java-source'; // Java
826
+ mimes.types['c'] = 'text/x-c'; // C
827
+ mimes.types['cpp'] = 'text/x-c++src'; // C++
828
+ mimes.types['cc'] = 'text/x-c++src'; // C++
829
+ mimes.types['cxx'] = 'text/x-c++src'; // C++
830
+ mimes.types['cs'] = 'text/x-csharp'; // C#
831
+ mimes.types['php'] = 'application/x-httpd-php'; // PHP
832
+ mimes.types['rb'] = 'text/x-ruby'; // Ruby
833
+ mimes.types['pl'] = 'text/x-perl'; // Perl
834
+ mimes.types['sh'] = 'application/x-sh'; // Shell Script
835
+ mimes.types['go'] = 'text/x-go'; // Go
836
+ mimes.types['swift'] = 'text/x-swift'; // Swift
837
+ mimes.types['kt'] = 'text/x-kotlin'; // Kotlin
838
+ mimes.types['rs'] = 'text/x-rustsrc'; // Rust
839
+ mimes.types['scala'] = 'text/x-scala'; // Scala
840
+ mimes.types['r'] = 'text/x-r-source'; // R
841
+ mimes.types['R'] = 'text/x-r-source'; // R (alternatif untuk huruf besar)
842
+ mimes.types['lua'] = 'text/x-lua'; // Lua
843
+ mimes.types['md'] = 'text/markdown'; // Markdown
844
+ mimes.types['json'] = 'application/json'; // JSON
845
+ mimes.types['js'] = 'application/javascript'; // JavaScript
846
+ mimes.types['ts'] = 'application/x-typescript'; // TypeScript
847
+ mimes.types['xml'] = 'application/xml'; // XML
848
+ mimes.types['yaml'] = 'application/x-yaml'; // YAML
849
+ mimes.types['yml'] = 'application/x-yaml'; // YAML (alternatif)
850
+ mimes.types['html'] = 'text/html'; // HTML
851
+ mimes.types['htm'] = 'text/html'; // HTML (alternatif)
852
+ mimes.types['css'] = 'text/css'; // CSS
853
+ mimes.types['scss'] = 'text/x-scss'; // SCSS (Sass)
854
+ mimes.types['sass'] = 'text/x-sass'; // Sass
855
+ mimes.types['less'] = 'text/x-less'; // Less
856
+ mimes.types['coffee'] = 'text/coffeescript'; // CoffeeScript
857
+ mimes.types['dart'] = 'application/dart'; // Dart
858
+ mimes.types['sql'] = 'application/sql'; // SQL
859
+ mimes.types['vb'] = 'text/x-vbscript'; // VBScript
860
+ mimes.types['vbs'] = 'text/x-vbscript'; // VBScript (alternatif)
861
+ mimes.types['bat'] = 'application/x-msdos-program'; // Batch script
862
+ mimes.types['cmd'] = 'application/cmd'; // Command script
863
+ mimes.types['ps1'] = 'application/x-powershell'; // PowerShell script
864
+ mimes.types['ini'] = 'text/plain'; // INI file
865
+ mimes.types['toml'] = 'application/toml'; // TOML
866
+ mimes.types['cfg'] = 'text/plain'; // Configuration file
867
+ mimes.types['conf'] = 'text/plain'; // Configuration file
868
+ mimes.types['properties'] = 'text/plain'; // Properties file
869
+ mimes.types['log'] = 'text/plain'; // Log file
870
+ mimes.types['yml'] = 'application/x-yaml'; // YAML file
871
+ mimes.types['rst'] = 'text/x-rst'; // reStructuredText
872
+ mimes.types['latex'] = 'application/x-latex'; // LaTeX
873
+ mimes.types['tex'] = 'application/x-tex'; // TeX
874
+ mimes.types['bib'] = 'text/x-bibtex'; // BibTeX
875
+ mimes.types['mat'] = 'application/x-matlab-data'; // MATLAB
876
+ mimes.types['m'] = 'text/x-matlab'; // MATLAB or Objective-C
877
+ mimes.types['octave'] = 'text/x-octave'; // GNU Octave
878
+ mimes.types['rmd'] = 'text/x-r-markdown'; // R Markdown
879
+ mimes.types['jl'] = 'text/x-julia'; // Julia
880
+ mimes.types['clj'] = 'text/x-clojure'; // Clojure
881
+ mimes.types['cljs'] = 'text/x-clojurescript'; // ClojureScript
882
+ mimes.types['cljc'] = 'text/x-clojure'; // Clojure (Common)
883
+ mimes.types['erl'] = 'text/x-erlang'; // Erlang
884
+ mimes.types['hs'] = 'text/x-haskell'; // Haskell
885
+ mimes.types['lhs'] = 'text/x-literate-haskell'; // Literate Haskell
886
+ mimes.types['ml'] = 'text/x-ocaml'; // OCaml
887
+ mimes.types['mli'] = 'text/x-ocaml'; // OCaml Interface
888
+ mimes.types['fs'] = 'text/x-fsharp'; // F#
889
+ mimes.types['fsi'] = 'text/x-fsharp'; // F# Interactive
890
+ mimes.types['fsx'] = 'text/x-fsharp'; // F# Script
891
+ mimes.types['fsscript'] = 'text/x-fsharp'; // F# Script (alternative)
892
+ mimes.types['elm'] = 'text/x-elm'; // Elm
893
+ mimes.types['elm'] = 'application/elm'; // Elm (alternative)
894
+ mimes.types['ex'] = 'text/x-elixir'; // Elixir
895
+ mimes.types['exs'] = 'text/x-elixir'; // Elixir Script
896
+ mimes.types['eex'] = 'text/x-eex'; // Elixir Embedded Templates
897
+ mimes.types['html.eex'] = 'text/x-html-elixir'; // Elixir HTML Embedded Templates
898
+ mimes.types['hx'] = 'text/x-haxe'; // Haxe
899
+ mimes.types['hxml'] = 'application/hxml'; // Haxe XML
900
+ mimes.types['sml'] = 'text/x-sml'; // Standard ML
901
+ mimes.types['thy'] = 'text/x-isabelle-theory'; // Isabelle Theory
902
+ mimes.types['lean'] = 'text/x-lean'; // Lean
903
+ mimes.types['v'] = 'text/x-verilog'; // Verilog
904
+ mimes.types['sv'] = 'text/x-systemverilog'; // SystemVerilog
905
+ mimes.types['vhd'] = 'text/x-vhdl'; // VHDL
906
+ mimes.types['vhdl'] = 'text/x-vhdl'; // VHDL (alternative)
907
+ mimes.types['scm'] = 'text/x-scheme'; // Scheme
908
+ mimes.types['ss'] = 'text/x-scheme'; // Scheme (alternative)
909
+ mimes.types['rkt'] = 'text/x-racket'; // Racket
910
+ mimes.types['lisp'] = 'text/x-common-lisp'; // Common Lisp
911
+ mimes.types['asd'] = 'text/x-common-lisp'; // Common Lisp ASDF
912
+ mimes.types['cl'] = 'text/x-common-lisp'; // Common Lisp (alternative)
913
+ mimes.types['el'] = 'text/x-emacs-lisp'; // Emacs Lisp
914
+ mimes.types['sc'] = 'text/x-supercollider'; // SuperCollider
915
+ mimes.types['f'] = 'text/x-fortran'; // Fortran
916
+ mimes.types['f90'] = 'text/x-fortran'; // Fortran (alternative)
917
+ mimes.types['f95'] = 'text/x-fortran'; // Fortran (alternative)
918
+ mimes.types['v'] = 'text/x-vim'; // Vim Script
919
+ mimes.types['pro'] = 'text/x-prolog'; // Prolog
920
+ mimes.types['pl'] = 'text/x-prolog'; // Prolog (alternative to Perl)
921
+ mimes.types['p'] = 'text/x-pascal'; // Pascal
922
+ mimes.types['pas'] = 'text/x-pascal'; // Pascal (alternative)
923
+ mimes.types['d'] = 'text/x-d'; // D
924
+ mimes.types['ada'] = 'text/x-ada'; // Ada
925
+ mimes.types['adb'] = 'text/x-ada'; // Ada Body
926
+ mimes.types['ads'] = 'text/x-ada'; // Ada Specification
927
+ mimes.types['nim'] = 'text/x-nim'; // Nim
928
+ mimes.types['nimble'] = 'text/x-nim'; // Nimble
929
+ mimes.types['cr'] = 'text/x-crystal'; // Crystal
930
+ mimes.types['cl'] = 'text/x-clarion'; // Clarion
931
+ mimes.types['prg'] = 'text/x-clarion'; // Clarion Program
932
+ mimes.types['l'] = 'text/x-lex'; // Lex/Flex
933
+ mimes.types['yy'] = 'text/x-bison'; // Bison/Yacc
934
+ mimes.types['bison'] = 'text/x-bison'; // Bison/Yacc (alternative)
935
+ mimes.types['mly'] = 'text/x-menhir'; // Menhir
936
  let {fileTypeFromBuffer} = await (await import('file-type'))
937
  return res.json({
938
  message:"Success",