> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # CreateFileUploadUrl # Package: operations # Namespace: DataMovementService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/cms/operations/data-movement-jobs/create-file-upload-url.md ## Permission Scopes: Data Mover Manage Jobs: SCOPE.DC-DATA.MANAGE_MOVEMENT_JOBS ## Introduction Creates an upload URL for a data source file. Before submitting a job to import data from a file to a collection, call this method to generate an upload URL. Use the `uploadUrl` in the response to upload your source file. For example: `curl --request PUT --upload-file "${path_to_file}" "${uploadUrl}"` > **Note**: The URL is valid for 15 minutes. --- ## REST API ### Schema ``` Method: createFileUploadUrl Description: Creates an upload URL for a data source file. Before submitting a job to import data from a file to a collection, call this method to generate an upload URL. Use the `uploadUrl` in the response to upload your source file. For example: `curl --request PUT --upload-file "${path_to_file}" "${uploadUrl}"` > **Note**: The URL is valid for 15 minutes. URL: https://www.wixapis.com/v1/temporary-files/upload-url Method: POST Method parameters: param name: fileName | type: fileName | description: Name of uploaded file. Return type: CreateFileUploadUrlResponse - name: fileId | type: string | description: File GUID. - name: uploadUrl | type: string | description: URL to which you can upload the file. ``` ### Examples ### Create a file upload URL ```curl curl -X POST 'https://www.wixapis.com/data-mover/v1/temporary-files/upload-url' \ -H 'Authorization: ' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.operations.DataMovementService.createFileUploadUrl(options) Description: Creates an upload URL for a data source file. Before submitting a job to import data from a file to a collection, call this method to generate an upload URL. Use the `uploadUrl` in the response to upload your source file. For example: `curl --request PUT --upload-file "${path_to_file}" "${uploadUrl}"` > **Note**: The URL is valid for 15 minutes. Method parameters: param name: options | type: CreateFileUploadUrlOptions none - name: fileName | type: string | description: Name of uploaded file. Return type: PROMISE - name: fileId | type: string | description: File GUID. - name: uploadUrl | type: string | description: URL to which you can upload the file. ``` ### Examples ### createFileUploadUrl ```javascript import { movementJobs } from '@wix/data'; async function createFileUploadUrl(options) { const response = await movementJobs.createFileUploadUrl(options); }; ``` ### createFileUploadUrl (with elevated permissions) ```javascript import { movementJobs } from '@wix/data'; import { auth } from '@wix/essentials'; async function myCreateFileUploadUrlMethod(options) { const elevatedCreateFileUploadUrl = auth.elevate(movementJobs.createFileUploadUrl); const response = await elevatedCreateFileUploadUrl(options); } ``` ### createFileUploadUrl (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { movementJobs } from '@wix/data'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { movementJobs }, // Include the auth strategy and host as relevant }); async function createFileUploadUrl(options) { const response = await myWixClient.movementJobs.createFileUploadUrl(options); }; ``` ---