fix(core-flows,types): change doc for upload file functions (#13809)

* fix(core-flows,types): change doc for upload file functions

* Create silent-seas-hammer.md

* comment

* comment
This commit is contained in:
William Bouchard
2025-11-07 04:12:57 -05:00
committed by GitHub
parent 6cd40c9f74
commit a9d33bc8d1
6 changed files with 16 additions and 10 deletions

View File

@@ -0,0 +1,6 @@
---
"@medusajs/core-flows": patch
"@medusajs/types": patch
---
fix(core-flows,types): change doc for upload file functions

View File

@@ -1,6 +1,6 @@
import type { IFileModuleService } from "@medusajs/framework/types"
import { Modules } from "@medusajs/framework/utils"
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
/**
* The data to upload files.
@@ -23,7 +23,7 @@ export type UploadFilesStepInput = {
mimeType: string
/**
* The content of the file. For images, for example,
* use binary string. For CSV files, use the CSV content.
* use base64 string. For CSV files, use the CSV content.
*/
content: string
/**
@@ -48,7 +48,7 @@ export const uploadFilesStepId = "upload-files"
* {
* filename: "test.jpg",
* mimeType: "img/jpg",
* content: "binary-string",
* content: "base64-string",
* access: "public"
* }
* ]

View File

@@ -1,8 +1,8 @@
import type { FileDTO } from "@medusajs/framework/types"
import {
createWorkflow,
WorkflowData,
WorkflowResponse,
createWorkflow,
} from "@medusajs/framework/workflows-sdk"
import { uploadFilesStep } from "../steps"
@@ -27,7 +27,7 @@ export type UploadFilesWorkflowInput = {
mimeType: string
/**
* The content of the file. For images, for example,
* use binary string. For CSV files, use the CSV content.
* use base64 string. For CSV files, use the CSV content.
*/
content: string
/**
@@ -58,7 +58,7 @@ export const uploadFilesWorkflowId = "upload-files"
* {
* filename: "test.jpg",
* mimeType: "img/jpg",
* content: "binary-string",
* content: "base64-string",
* access: "public"
* }
* ]

View File

@@ -18,7 +18,7 @@ export interface CreateFileDTO {
mimeType: string
/**
* The file content as a binary-encoded string.
* The file content as a base64-encoded string.
*/
content: string

View File

@@ -72,7 +72,7 @@ export type ProviderUploadFileDTO = {
mimeType: string
/**
* The file content as a binary-encoded string
* The file content as a base64-encoded string
*/
content: string

View File

@@ -30,7 +30,7 @@ export interface IFileModuleService extends IModuleService {
* const [file] = await fileModuleService.createFiles([{
* filename: "product.png",
* mimeType: "image/png",
* content: "somecontent" // binary string
* content: "somecontent" // base64 string
* }])
*/
createFiles(
@@ -49,7 +49,7 @@ export interface IFileModuleService extends IModuleService {
* const file = await fileModuleService.createFiles({
* filename: "product.png",
* mimeType: "image/png",
* content: "somecontent" // binary string
* content: "somecontent" // base64 string
* })
*/