Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support of IFC upload #26

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Added support of IFC upload #26

merged 1 commit into from
Jan 14, 2025

Conversation

vladyslav-tk
Copy link
Contributor

No description provided.

@vladyslav-tk vladyslav-tk requested a review from gberaudo January 13, 2025 15:26
}

const decoder = new TextDecoder('utf-8');
const text = decoder.decode(arrayBuffer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const text = decoder.decode(arrayBuffer);
const text = decoder.decode(arrayBuffer.slice(0, 15);

}

const decoder = new TextDecoder('utf-8');
const text = decoder.decode(arrayBuffer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, what happens when the loaded file is binary?
I guess the decode will fail.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested, it works


const decoder = new TextDecoder('utf-8');
const text = decoder.decode(arrayBuffer);
const isIfc = text.includes('ISO-10303-21');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be startsWith?

@vladyslav-tk vladyslav-tk merged commit 40c2c61 into master Jan 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants