Class DeferredFileReference
- Namespace
- GroupeIsa.Neos.Designer.UIAbstractions.API
- Assembly
- GroupeIsa.Neos.Designer.UIAbstractions.dll
Represents a reference to a file whose upload must be started manually.
[ExcludeFromCodeCoverage]
public class DeferredFileReference : FileReference
- Inheritance
-
DeferredFileReference
- Inherited Members
Constructors
DeferredFileReference()
Initializes a new instance of the DeferredFileReference class.
protected DeferredFileReference()
Properties
Callback
Gets the callback method that is called when uploading has finished or failed.
public Func<DeferredFileReference, Task>? Callback { get; }
Property Value
Methods
FromContent(ApiClient, string, byte[], string)
Creates a file reference from a file name and content.
public static DeferredFileReference FromContent(ApiClient apiClient, string fileName, byte[] content, string contentType)
Parameters
apiClientApiClientAPI client.
fileNamestringThe file name.
contentbyte[]The binary content.
contentTypestringThe content type.
Returns
- DeferredFileReference
The file reference.
FromContent(ApiClient, string, string, string)
Creates a file reference from a file name and content.
public static DeferredFileReference FromContent(ApiClient apiClient, string fileName, string content, string contentType)
Parameters
apiClientApiClientAPI client.
fileNamestringThe file name.
contentstringThe text content.
contentTypestringThe content type.
Returns
- DeferredFileReference
The file reference.
FromContent(string, byte[], string)
Creates a file reference from a file name and content.
[Obsolete("Use FromContent(ApiClient apiClient, string fileName, byte[] content, string contentType) instead.")]
public static DeferredFileReference FromContent(string fileName, byte[] content, string contentType)
Parameters
fileNamestringThe file name.
contentbyte[]The binary content.
contentTypestringThe content type.
Returns
- DeferredFileReference
The file reference.
FromContent(string, string, string)
Creates a file reference from a file name and content.
[Obsolete("Use FromContent(ApiClient apiClient, string fileName, string content, string contentType) instead.")]
public static DeferredFileReference FromContent(string fileName, string content, string contentType)
Parameters
fileNamestringThe file name.
contentstringThe text content.
contentTypestringThe content type.
Returns
- DeferredFileReference
The file reference.
FromValue(ApiClient, string)
Creates a file reference from a value (a partial URL, see file data type documentation for more informations).
public static DeferredFileReference FromValue(ApiClient apiClient, string value)
Parameters
Returns
- DeferredFileReference
The file reference.
FromValue(string)
Creates a file reference from a value (a partial URL, see file data type documentation for more informations).
[Obsolete("Use FromValue(ApiClient apiClient, string value) instead.")]
public static DeferredFileReference FromValue(string value)
Parameters
valuestringValue (partial URL).
Returns
- DeferredFileReference
The file reference.
StartUpload()
Starts to upload.
public void StartUpload()
WithCallback(Func<DeferredFileReference, Task>)
Adds a callback method called when uploading has finished or failed.
[SuppressMessage("Minor Code Smell", "S2325:Methods and properties that don't access instance data should be static", Justification = "Transpilation")]
public DeferredFileReference WithCallback(Func<DeferredFileReference, Task> callback)
Parameters
callbackFunc<DeferredFileReference, Task>Asynchronous callback method.
Returns
- DeferredFileReference
File reference.