You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -172,12 +174,11 @@ A [normalizer](serialization.md#normalization) could be used to set the `content
172
174
namespace App\Serializer;
173
175
174
176
use App\Entity\MediaObject;
175
-
use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface;
176
177
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
177
178
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
178
179
use Vich\UploaderBundle\Storage\StorageInterface;
179
180
180
-
final class MediaObjectNormalizer implements ContextAwareNormalizerInterface, NormalizerAwareInterface
181
+
final class MediaObjectNormalizer implements NormalizerAwareInterface
181
182
{
182
183
use NormalizerAwareTrait;
183
184
@@ -224,17 +225,23 @@ your data, you will get a response looking like this:
224
225
225
226
### Accessing Your Media Objects Directly
226
227
227
-
You will need to modify your Caddyfile to allow the above `contentUrl` to be accessed directly. If you followed the above configuration for the VichUploaderBundle, that will be in `api/public/media`. Add your folder to the list of path matches, e.g. `|^/media/|`:
228
-
229
-
```caddyfile
230
-
...
231
-
# Matches requests for HTML documents, for static files and for Next.js files,
232
-
# except for known API paths and paths with extensions handled by API Platform
You will need to modify your `Caddyfile` to allow the above `contentUrl` to be accessed directly. If you followed the above configuration for the VichUploaderBundle, that will be in `api/public/media`. Add your folder to the list of path matches, e.g. `|^/media/|`:
229
+
230
+
<!-- markdownlint-disable no-hard-tabs -->
231
+
```patch
232
+
# Matches requests for HTML documents, for static files and for Next.js files,
233
+
# except for known API paths and paths with extensions handled by API Platform
0 commit comments