Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WF: allow the ability to fire a contentlet with binary field by using just a text plain #24301

Closed
jdotcms opened this issue Mar 7, 2023 · 2 comments · Fixed by #24302
Closed

Comments

@jdotcms
Copy link
Contributor

jdotcms commented Mar 7, 2023

Parent Issue

No Parent

User Story

As an API user I want to be able to send in a binary field a String, so I can fire an action on the WF Rest API without needing the multipart request.
The idea would be to support such as

curl --location --request PUT 'http://localhost:8080/api/v1/workflow/actions/default/fire/PUBLISH' \
--header 'Authorization: Basic YWRtaW5AZG90Y21zLmNvbTphZG1pbg==' \
--header 'Content-Type: application/json' \
--data-raw '{
    "contentlet": {
        "hostFolder":"default",
        "title": "greatings.txt",
        "fileName": "greatings.txt",
        "fileAsset": {
            "fileName": "greatings.txt",
           "content": "Hello dotCMS"
         },
        "contentType": "FileAsset"
    }
}'

This allows you to have the ability to create a text file asset without need to upload previously on the temp api neither using the multpart request

Acceptance Criteria

File asset may be created using single put on the WF Rest API

Proposed Objective

Core Features

Proposed Priority

Priority 3 - Average

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

No response

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

@jdotcms jdotcms added this to the 2023 milestone Mar 7, 2023
@jdotcms jdotcms self-assigned this Mar 7, 2023
jdotcms added a commit that referenced this issue Mar 7, 2023
@jdotcms jdotcms linked a pull request Mar 7, 2023 that will close this issue
jdotcms added a commit that referenced this issue Mar 9, 2023
fmontes pushed a commit that referenced this issue May 4, 2023
* #24301 adding first draft missing test

* #24301 adding some security refactor and some unit test

* #24301 adding feedback
@alfredo-dotcms alfredo-dotcms self-assigned this May 9, 2023
@alfredo-dotcms
Copy link
Contributor

image

looks good to me!

@josemejias11
Copy link

Approved QA - Tested on 23.06_1aa99392_SNAPSHOT // Docker // macOS 13.0 // FF v112.0.1

Screenshot 2023-05-09 at 3 28 32 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment