Salesforce has two different UIs and in accordance with it, it has the possibility to store attached files differently. Two files were uploaded via the classic UI and they are marked as 'attachments'. Other files were uploaded through the new UI and they are marked as 'files'. I want to upload all of these files using REST API. I cannot find the proper documentation. Can somebody help me with this?
How to upload files and attachments to the sobject record using REST API?
5k views Asked by Pavlo Mykhailyshyn At
1
There are 1 answers
Related Questions in REST
- Query parameter works fine with fastapi application when tested locally but not working when the FastAPI application is deployed on AWS lambda
- Add an http GET/POST entry point to a Django with channels websocket
- Difficulty creating a data pipeline with Fabric Datafactory using REST
- Flutter connection to a local api
- Accessing REST API Status Codes using Azure Data Factory Copy Activity (or similar)?
- Mass Resource deletion in REST
- why when I check endpoint /tasks, an error always appears "error : invalid token" even though I have entered the appropriate token that I got
- How to prevent users from creating custom client apps?
- How to create a REST API with .NET Framework?
- Efficiently Handling Large Number of API Calls with Delphi 10.4 and OmniThreadLibrary
- Put Request throwing 401 [no body] Unauthorized
- Converting img src data to octet-stream
- Implementing Email Verification and Notification System in a Full-Stack Application with React Frontend and Node Backend
- Micronaut - Add Controller from external library
- Moving Template or OVA to Datastore using vCenter API
Related Questions in API
- Google Sheets API - Append Request not working
- Is there really no product for docs that has these?
- How to show suggested content in response using Azure Cognitive Search?
- error message when closing current position in binance futures, using ccxt library
- How to filter API data in React Native
- I have fetched an API with JS, but the output looks really bad and I don't know how to fix it
- Session is not storing in react and Asp Dot Core Web API
- Apex charts not rendering series value, showing cannot map values of NULL
- Configure IIS to accept API calls only from API Manager, Deny from direct calls
- Problems with API return using the Axios library in NextJS
- How to query by Iteration in pyral?
- Is there a way to have a user enter a url query and have a single function filter a database?
- Cant get value in Vue from data
- Read stories/posts using instagram API
- Need To Make Minor Change To REST API Response
Related Questions in SALESFORCE
- UI Component(Table Rows) Taking Too Much too in LWC
- Twilio Salesforce integration (Chat Transcripts)
- How can I automatically apply dark and light themes using the Lightning Email Template Builder in Salesforce based on the user's system preferences?
- Sending Slack Message to channel from salesforce flow
- How to redirect to parent object after child record creation
- Creating File in Drag and Drop Enabled File Cabinet in Netsuite using Rest API from Salesforce
- tsql functions like REPLACE() failing in azure data factory pipeline connected to salesforce
- An unexpected error occurred. Please include this ErrorId if you contact support: 1878486530-323938 (1541428280)
- My requirement is that I have to create DLRS for 'the date when the most recent email was received'
- Declarative Rollup Summaries Deployment
- Trouble updating a Field in Salesforce via a Python Script
- Why custom favicon for Salesforce-powered website not showing consistently in Google search results
- Salesforce chatter photo upload trigger
- Disable Azure DevOps Pull Request being completed when Using Copado
- AppFlow s3 to Salesforce upsert fails
Related Questions in SALESFORCE-LIGHTNING
- UI Component(Table Rows) Taking Too Much too in LWC
- How can I automatically apply dark and light themes using the Lightning Email Template Builder in Salesforce based on the user's system preferences?
- Error in running apex code in vs code studio
- Declarative Rollup Summaries Deployment
- Trouble updating a Field in Salesforce via a Python Script
- User object Expressions not working in B2B Commerce LWR site
- Lightning-datatable: Inline editing with checkbox doesn't work
- What is the CSS @Page Property Selector to access the last page of the PDF? Do we have :last() selector in CSS?
- How to remove the default notification hover tooltip of salesforce CRM?
- Why the Visual Force page request is called twice when used window.open JS from LWC?
- Extracting and Storing Code Parameter After Logging In on Flutter App
- Generating barcode image in salesforce apex email with a generated sting in flows
- Not able to get the element using any of the locator in JS or in Selenium. This is salesforce website. Looks like they have protected by some means
- Save successful Authorize.net payment details in Salesforce
- How to hide or encrypt the payloads when API calling is made from js of LWC?
Related Questions in SALESFORCE-CHATTER
- Salesforce chatter photo upload trigger
- Not getting any records from ContentVersion in Salesforce SOQL query,
- Apex | How i can create EmailMessage register in Chatter component of a custom object?
- Salesforce trial org: no more storage due to "Interaction Count Reports"
- Is there any way to undo the changes of code in salesforce org?
- How to know Order is placed from authenticated customer or guest In salesforce commerce cloud?
- Reply, ReplyAll and Forward buttons are not appearing on EmailMessage layout of claim related record
- DateTime.parse() not working if ICU is enable in salesforce
- Error: Incorrect parameter type for operator '<'. Expected Boolean, received Text
- Not able to append <Script/> tag to <div> index.html react.js
- Is there a way of using a row level formula to filter down to opportunities to the end of the month?
- Fetching the child element in a column from salesforce
- Task assign to multiple leads in salesforce using rest api
- How to upload files and attachments to the sobject record using REST API?
- How to get a list of all the attached files of the specific sobject record?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
That's not 100% true. In SF Classic UI you were able to upload Files too. It's "just" about knowing the right API name of the table and you'll find lots of examples online.
AttachmentandDocumentobjects have exactly same API names, you can view their definitions in SOAP API definition or in REST API explorer (there was something which you can still see in screenshot in here, seems to be down now, maybe they're moving it to another area in documentation...)The Files (incl. "Chatter Files") are stored in
ContentDocumentandContentVersionobject. The name is unexpected because long time ago SF purchased another company's product and it was called "Salesforce Content". In beginning it was bit of mess, now it's better integrated into whole platform but still some things lurk like File folders can be called Libraries sometimes in documentation but actual API name isContentWorkspace. The entity relationship diagram can help a bit: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_erd_content.htmContentDocumentis a header to which many places in SF link (imagine file wasting space on disk only once but being cross-linked from multiple records). It can have at least 1 version and if you need to update the document - you'd upload new version but all links in org wouldn't change, they'd still link to header.So, how to use it?