nextjs公用文件夹找不到一些文件404

时间:2020-10-13 06:51:59

标签: node.js reactjs svg next.js

nextjs / public文件夹中有一个非常奇怪的行为

我在这里有两个文件

  • USDcard.svg
  • Pcard.svg

USDcard.svg

<svg width="270" height="153" viewBox="0 0 270 153" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0)">
<rect width="300" height="152" fill="#53AE94" fill-opacity="0.49"/>
<g opacity="0.6" clip-path="url(#clip1)">
<path d="M238.055 0C280.056 0 314.109 34.0527 314.109 76.0546C314.109 118.056 280.055 152.109 238.055 152.109C196.054 152.109 162 118.066 162 76.0546C162 34.0435 196.048 0 238.055 0Z" fill="#53AE94"/>
<path d="M247.441 65.9211V54.6072H273.313V37.3687H202.863V54.6072H228.738V65.9119C207.709 66.8778 191.897 71.0426 191.897 76.0318C191.897 81.0209 207.716 85.1857 228.738 86.1577V122.398H247.447V86.1546C268.438 85.1857 284.218 81.024 284.218 76.0394C284.218 71.0547 268.438 66.893 247.447 65.9241L247.441 65.9211ZM247.447 83.0851V83.0759C246.919 83.1094 244.207 83.2722 238.169 83.2722C233.341 83.2722 229.944 83.1353 228.747 83.0729V83.0881C210.168 82.2652 196.301 79.0298 196.301 75.1587C196.301 71.2875 210.17 68.0567 228.747 67.2322V79.8649C229.964 79.9486 233.444 80.1539 238.248 80.1539C244.017 80.1539 246.918 79.9136 247.45 79.8649V67.2322C265.992 68.0582 279.828 71.2966 279.828 75.1541C279.828 79.0116 265.986 82.2515 247.45 83.0775" fill="white"/>
</g>
</g>
<defs>
<clipPath id="clip0">
<rect width="270" height="153" fill="white"/>
</clipPath>
<clipPath id="clip1">
<rect width="152.109" height="152.109" fill="white" transform="translate(162)"/>
</clipPath>
</defs>
</svg>

Pcard.svg

<svg width="270" height="153" viewBox="0 0 270 153" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0)">
<rect width="270" height="152" fill="url(#paint0_linear)" fill-opacity="0.8"/>
<g opacity="0.75" filter="url(#filter0_d)">
<path d="M215.375 76.5V131.188" stroke="white" stroke-width="8"/>
<ellipse cx="243.5" cy="76.4998" rx="28.125" ry="28.125" stroke="white" stroke-width="8"/>
<path d="M306 76.5C306 88.8613 302.334 100.945 295.467 111.223C288.599 121.501 278.838 129.512 267.418 134.242C255.997 138.973 243.431 140.211 231.307 137.799C219.183 135.388 208.047 129.435 199.306 120.694C190.565 111.953 184.612 100.817 182.201 88.6931C179.789 76.5693 181.027 64.0027 185.758 52.5823C190.488 41.1619 198.499 31.4007 208.777 24.5331C219.055 17.6656 231.139 14 243.5 14" stroke="white" stroke-width="8"/>
<path d="M255.771 15.2165C267.564 17.5779 278.425 23.2917 287.052 31.6725C295.678 40.0533 301.703 50.745 304.404 62.465" stroke="white" stroke-width="8"/>
</g>
</g>
<defs>
<filter id="filter0_d" x="173" y="10" width="141" height="141" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
</filter>
<linearGradient id="paint0_linear" x1="99.5625" y1="24.0383" x2="253.254" y2="169.889" gradientUnits="userSpaceOnUse">
<stop offset stop-color="#FF0F00"/>
<stop offset="0.588766" stop-color="#E05B10"/>
<stop offset="1" stop-color="#EABA3D"/>
</linearGradient>
<clipPath id="clip0">
<rect width="270" height="153" fill="white"/>
</clipPath>
</defs>
</svg>

但是,host / USDcard.svg可以在浏览器中成功加载,而host / Pcard.svg不能加载。我已经做了以下检查

  • 设置相同的权限(都已经具有相同的权限)
  • 将USDcard.svg复制为Pcard.svg =>这次Pcard可以加载,但内容当然是USDcard
  • 将Pcard复制为P2.txt =>无法加载P2.txt
  • 克隆了一个新的仓库

0 个答案:

没有答案
相关问题