def get_upload_urn(envelope_js):
    """Get the upload urn from the submission envelope.

    Args:
        envelope_js (dict): the submission envelope contents

    Returns:
        String giving the upload urn in the format s3://<bucket>/<uuid>,
        or None if the envelope doesn't contain a urn
    """
    details = envelope_js.get('stagingDetails')
    if not details:
        return None
    location = details.get('stagingAreaLocation')
    if not location:
        return None
    urn = location.get('value')
    return urn