Forum Discussion

pb9034's avatar
pb9034
New Contributor
5 days ago

use single request field for string as well as file

i want to use a single request field to take string and file both which one i want

2 Replies

  • Hi pb9034,

    Can you please clarify how I can help you and what you want to achieve? Having an example, description, or screenshots would be helpful. 

  • pb9034's avatar
    pb9034
    New Contributor

    want to use description input to be text or image according to my need as postman provides option to chose between text or file

    using like this:

     content:

     *         multipart/form-data:

     *           schema:

     *             type: object

     *             properties:

     *               title:

     *                 type: string

     *                 example: sample title

     *               resource_type:

     *                 type: integer

     *                 enum: [1, 2, 3]

     *                 example: 2

     *               description:

     *                 type: string

     *                 format: binary

     *                 description: File upload for resource_type 2 or 3

     *               category_id:

     *                 type: integer

     *                 example: 1