Fixed some issues
This commit is contained in:
@@ -71,6 +71,7 @@ const RandomSignUpload: React.FC = () => {
|
|||||||
// check if the sign is different from the current one
|
// check if the sign is different from the current one
|
||||||
if (sign === null || sign.id !== response.id) {
|
if (sign === null || sign.id !== response.id) {
|
||||||
setSign(response);
|
setSign(response);
|
||||||
|
setUploadProgress(null);
|
||||||
// set the video url
|
// set the video url
|
||||||
setSignVideo(response.video_url);
|
setSignVideo(response.video_url);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ const uploadSignVideo = async (id: number, recordedBlob: Blob, onUploadProgress:
|
|||||||
const response = await axios.post(`${process.env.REACT_APP_API_URL}/signs/${id}/video/`, formData, {
|
const response = await axios.post(`${process.env.REACT_APP_API_URL}/signs/${id}/video/`, formData, {
|
||||||
headers: {
|
headers: {
|
||||||
ContentType: 'multipart/form-data',
|
ContentType: 'multipart/form-data',
|
||||||
// close the connection after the request is sent
|
|
||||||
Connection: 'close',
|
|
||||||
},
|
},
|
||||||
onUploadProgress: (progressEvent) => {
|
onUploadProgress: (progressEvent) => {
|
||||||
onUploadProgress(
|
onUploadProgress(
|
||||||
|
|||||||
Reference in New Issue
Block a user