package cn.reghao.oss.store.util;

import cn.reghao.jutil.web.ServletUtil;

import javax.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("/", "");
    }
}
