# DCC.Upload not returning contents

**URL:** <https://community.plotly.com/t/dcc-upload-not-returning-contents/70893>\
**Category:** Dash Python\
**Created:** [December 15, 2022, 5:25pm UTC](https://community.plotly.com/t/dcc-upload-not-returning-contents/70893 "2022-12-15T17:25:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tphil10](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/tphil10/32/19868_2.png) [@tphil10](https://community.plotly.com/u/tphil10)\
**Post date:** [December 15, 2022, 5:25pm UTC](https://community.plotly.com/t/dcc-upload-not-returning-contents/70893/1 "2022-12-15T17:25:57Z")

</div>

Could be misunderstanding the upload component but I can’t seem to get it to return anything after the upload.

```auto
    dmc.Modal(
        id="upload-modal",
        size='xl',
        transition='slide-down',
        transitionDuration=400,
        children=[
            dcc.Upload(
                children=html.Div([
                    'Drag and Drop or ',
                    dmc.Anchor(
                        "Select Files",
                        href="#",
                    ),
                ]),
                style={
                    'lineHeight': '60px',
                    'borderWidth': '1px',
                    'borderStyle': 'dashed',
                    'borderRadius': '5px',
                    'textAlign': 'center'
                },
            ),
            html.Div(id='output-upload')
        ],
    )

@callback(Output('output-upload', 'children'),
              Input('upload-modal', 'contents'),
              State('upload-modal', 'filename'),
              State('upload-modal', 'last_modified'))
def update_output(list_of_contents, list_of_names, list_of_dates):
    print(list_of_contents, list_of_names, list_of_dates)

```

This return `None None None`

Am i missing something?

---

<div class="post-metadata">

**Author:** ![jinnyzor](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jinnyzor/32/21194_2.png) [@jinnyzor](https://community.plotly.com/u/jinnyzor)\
**Post date:** [December 15, 2022, 5:37pm UTC](https://community.plotly.com/t/dcc-upload-not-returning-contents/70893/2 "2022-12-15T17:37:19Z")

</div>

Hey @tphil10,

You’re input id is on the wrong thing. You are trying to get your contents from your modal component and not the upload. 🙂

---

<div class="post-metadata">

**Author:** ![tphil10](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/tphil10/32/19868_2.png) [@tphil10](https://community.plotly.com/u/tphil10)\
**Post date:** [December 15, 2022, 5:40pm UTC](https://community.plotly.com/t/dcc-upload-not-returning-contents/70893/3 "2022-12-15T17:40:06Z")

</div>

…you’re right, thank you haha  
I might need a break, clearly.
