Skip to content

Commit

Permalink
Merge pull request #16341 from salvadorleo/dev
Browse files Browse the repository at this point in the history
MIME prefix constraint removed
  • Loading branch information
Kharonus authored Aug 7, 2024
2 parents 3382a5e + 0d67ffd commit 2a7fbdb
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ def set_snapshot
def snapshot_data_complete?
viewpoint["snapshot"] &&
snapshot_extension &&
snapshot_base64 &&
snapshot_url_parts.length > 1
snapshot_base64
end

def snapshot_content_type
Expand All @@ -89,11 +88,11 @@ def snapshot_base64
end

def snapshot_binary_contents
Base64.decode64(snapshot_url_parts[2])
end

def snapshot_url_parts
snapshot_base64.match(/\Adata:([-\w]+\/[-\w+.]+)?;base64,(.*)/m) || []
if snapshot_base64.include?("base64,")
Base64.decode64(snapshot_base64.split("base64,").last)
else
Base64.decode64(snapshot_base64)
end
end

def viewpoint
Expand Down

0 comments on commit 2a7fbdb

Please sign in to comment.