Josef Trojkař
Josef Trojkař
NNuxt
Created by Josef Trojkař on 11/21/2024 in #❓・help
NuxtHub blob prefix not creating a new path
When I set a prefix for an image upload like this:
await hubBlob().handleUpload(event, {
multiple: false,
ensure: {
types: ['image/jpeg', 'image/png', 'image/webp'],
},
put: {
prefix: 'transformations'
}
})
await hubBlob().handleUpload(event, {
multiple: false,
ensure: {
types: ['image/jpeg', 'image/png', 'image/webp'],
},
put: {
prefix: 'transformations'
}
})
The image is accessible at: /images/transformations%2Fimage.png instead of what I expect: /images/transformations/image.png. BUT in the nuxt devtools path it IS accessible at: /api/_hub/blob/transformations/image.png . No errors appear anywhere. In nuxt devtools, I can normally view my blob storage and the image is correctly placed inside the folder 'transformations'. Is this intended behavior? If not, how do I fix it? I care mainly because of SEO. I don't want my image names to be plagued with a prefix not necessarily related to the image.
4 replies