getTeamFilesByWorkspaceByFilenameWithHttpInfo method

Future<Response> getTeamFilesByWorkspaceByFilenameWithHttpInfo(
  1. String workspace,
  2. String filename
)

Download a workspace file

Streams one blob's raw BYTES back — this is the read side of the workspace file store, not a JSON envelope around it. THE BLOB IS NAMED BY THE file QUERY PARAMETER, NOT BY :filename. The path segment is only the name a browser saves the download under; a request without ?file= is a 400 no matter what the path says. The Content-Type is derived from the STORED BYTES, never from the name: only png, jpeg, gif and webp, recognized by their magic bytes, are served inline under their true type, and everything else is served inert as application/octet-stream with an attachment disposition. Every response carries nosniff, so a file uploaded under an .svg or .html name cannot be talked into executing in a viewer's origin. Blobs are immutable, so a hit caches privately for a year. Same gate as the upload: verified token, membership of the workspace. A genuine miss, another tenant's workspace, a workspace the caller is not in, and a blob id belonging to a different workspace are ONE answer — 404 — because the physical key is org- and workspace-scoped and a foreign id is simply a key that does not exist. An unavailable backend is a 502, never an empty 200.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> getTeamFilesByWorkspaceByFilenameWithHttpInfo(String workspace, String filename,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/team/files/{workspace}/{filename}'
    .replaceAll('{workspace}', workspace)
    .replaceAll('{filename}', filename);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}