MultipartEncodingFailureReason
public enum MultipartEncodingFailureReason : Sendable
The underlying reason the .multipartEncodingFailed
error occurred.
-
The
fileURL
provided for reading an encodable body part isn’t a fileURL
.Declaration
Swift
case bodyPartURLInvalid(url: URL)
-
The filename of the
fileURL
provided has either an emptylastPathComponent
orpathExtension
.Declaration
Swift
case bodyPartFilenameInvalid(in: URL)
-
The file at the
fileURL
provided was not reachable.Declaration
Swift
case bodyPartFileNotReachable(at: URL)
-
Attempting to check the reachability of the
fileURL
provided threw an error.Declaration
Swift
case bodyPartFileNotReachableWithError(atURL: URL, error: any Error)
-
The file at the
fileURL
provided is actually a directory.Declaration
Swift
case bodyPartFileIsDirectory(at: URL)
-
The size of the file at the
fileURL
provided was not returned by the system.Declaration
Swift
case bodyPartFileSizeNotAvailable(at: URL)
-
The attempt to find the size of the file at the
fileURL
provided threw an error.Declaration
Swift
case bodyPartFileSizeQueryFailedWithError(forURL: URL, error: any Error)
-
An
InputStream
could not be created for the providedfileURL
.Declaration
Swift
case bodyPartInputStreamCreationFailed(for: URL)
-
An
OutputStream
could not be created when attempting to write the encoded data to disk.Declaration
Swift
case outputStreamCreationFailed(for: URL)
-
The encoded body data could not be written to disk because a file already exists at the provided
fileURL
.Declaration
Swift
case outputStreamFileAlreadyExists(at: URL)
-
The
fileURL
provided for writing the encoded body data to disk is not a fileURL
.Declaration
Swift
case outputStreamURLInvalid(url: URL)
-
The attempt to write the encoded body data to disk failed with an underlying error.
Declaration
Swift
case outputStreamWriteFailed(error: any Error)
-
The attempt to read an encoded body part
InputStream
failed with underlying system error.Declaration
Swift
case inputStreamReadFailed(error: any Error)