How can I get back the response from server #133
Answered
by
yoavniran
void-m4110c
asked this question in
Q&A
-
|
Hi, I'm uploading a csv file and some additional parameters to a server. It's just an upload button to select the file in an uploady component, which is embedded in a table: <TableRow>
<TableCell>{constructLineDropdown()}</TableCell>
<TableCell>{constructDatePicker('StartDate')}</TableCell>
<TableCell>{constructDatePicker('EndDate')}</TableCell>
<Uploady
clearPendingOnAdd
multiple={false}
accept=".csv"
params={{
lineId: capLineId,
startDate: startDate.toISOString().split('T')[0],
endDate: endDate.toISOString().split('T')[0],
}}
destination={{ url: props.uploadURL }}
>
<UploadButton text={i18n.translateToString('UploadFile')} />
</Uploady>
</TableRow>I know that the upload works correctly, but is there any way that I can get the HTTPResponse from this upload? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
yoavniran
Feb 19, 2021
Replies: 1 comment 6 replies
-
|
Hey @void-m4110c There are two ways to do this. Using event listeners or hooks the response will be available through the item's |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
void-m4110c
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @void-m4110c
yes, of course you can access the response.
There are two ways to do this. Using event listeners or hooks
the response will be available through the item's
uploadResponseproperty.