Recommended: In the options parameter, you can specify the
media type
of the file in the contentType. If unspecified, the function uses the default type of
application/octet-stream, indicating a binary data file.
When saving a file with [[overwriteFile]], the Solid server creates any
intermediary Containers as needed; i.e., the Containers do not
need to be created in advance. For example, when saving a file to the target URL of
https://example.pod/container/resource, if https://example.pod/container/ does not exist,
the container is created as part of the save.
Saves a file at a given URL. If a file already exists at the URL, the function overwrites the existing file.
For example:
For additional example, see Read/Write Files.
Recommended: In the
options
parameter, you can specify the media type of the file in thecontentType
. If unspecified, the function uses the default type ofapplication/octet-stream
, indicating a binary data file.When saving a file with [[overwriteFile]], the Solid server creates any intermediary Containers as needed; i.e., the Containers do not need to be created in advance. For example, when saving a file to the target URL of https://example.pod/container/resource, if https://example.pod/container/ does not exist, the container is created as part of the save.