package cn.reghao.tnb.oss.store.util;

import cn.reghao.tnb.common.web.ServletUtil;

import jakarta.servlet.http.HttpServletRequest;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;

/**
 * @author reghao
 * @date 2023-05-25 09:34:49
 */
public class ObjectUtil {
    public static String getObjectName() {
        HttpServletRequest servletRequest = ServletUtil.getRequest();
        String uri = servletRequest.getRequestURI();
        String uri1 = URLDecoder.decode(uri, StandardCharsets.UTF_8);
        return uri1.replaceFirst("/", "");
    }
}
