Closed billyvg closed 1 year ago
Hmm, would it be enough to make sure we ignore input[type="file"]
? 🤔 via the ignore
option by default?
Actually I guess this is actually two issues:
const fileInput = document.querySelector('#file-input');
fileInput.addEventListener('change', (event) => {
const previewImage = document.querySelector(#preview-image');
previewImage.src = convertEventToBase64Img(event);
}
Which would not really be prevented, and basically amounts to inlining the image.
I guess to "fix" this we should replace base 64 strings with placeholders? E.g.
// extend this function
function transformAttribute() {
if(value.test(/^data:(.*);base64,(.*)$/) {
// replace with placeholder base64?
}
Does that make sense?
Yeah I think it makes sense to strip inlined base 64 content from attributes.
Update: We've decided not to act on any additional inlined base64 content for now and continue monitoring our segment sizes.
Mutations are capturing file uploads, which cause the replay to become very large. There's no reason to capture this data.
Example snippet: