Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
myhr-portal
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
angular
myhr-portal
Commits
abfda394
Commit
abfda394
authored
Jun 28, 2024
by
Nakarin Luankla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UPDATE fileType
parent
43bce44b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
list-excell.component.ts
src/app/apps/list-excell/list-excell.component.ts
+2
-2
No files found.
src/app/apps/list-excell/list-excell.component.ts
View file @
abfda394
...
...
@@ -74,7 +74,7 @@ export class ListExcelComponent implements OnInit {
if
(
event
.
target
.
files
&&
event
.
target
.
files
[
0
])
{
const
reader
=
new
FileReader
();
const
file
:
File
=
event
.
target
.
files
[
0
];
console
.
log
(
"🚀 ~ ListExcelComponent ~ onSelectFile ~ file:"
,
file
.
type
)
console
.
log
(
"🚀 ~ ListExcelComponent ~ onSelectFile ~ file:"
,
file
)
reader
.
readAsDataURL
(
event
.
target
.
files
[
0
]);
// read file as data url
reader
.
onload
=
(
event
)
=>
{
// called once readAsDataURL is completed
if
(
event
){
...
...
@@ -84,7 +84,7 @@ export class ListExcelComponent implements OnInit {
}
else
{
let
base64
=
event
.
target
!
.
result
as
string
this
.
modelExcel
.
excelObj
=
base64
.
split
(
','
)[
1
];
this
.
modelExcel
.
fileType
=
file
.
type
this
.
modelExcel
.
fileType
=
file
.
name
.
split
(
'.'
)[
file
.
name
.
split
(
'.'
).
length
-
1
]
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment