Merge branch 'resource-mp4-download' of WrenchBoard/Users-Wrench into master
This commit is contained in:
@@ -44,7 +44,8 @@ export default function MyUploadedFiles({ uploadedFiles }) {
|
|||||||
currentFiles.map((value, idx) => {
|
currentFiles.map((value, idx) => {
|
||||||
let addedDate = value?.added?.split(" ")[0];
|
let addedDate = value?.added?.split(" ")[0];
|
||||||
let formattedSize = formatFileSize(value?.file_size);
|
let formattedSize = formatFileSize(value?.file_size);
|
||||||
let imageLink = `${uploadedFiles?.image}${localStorage.getItem('session_token')}/myfile/${value.file_uid}`
|
let downloadLink = value.file_type == 'video/mp4' ? `${process.env.REACT_APP_MEDIA_LINK}/myfile/${value.file_uid}` : `${uploadedFiles?.image}${localStorage.getItem('session_token')}/myfile/${value.file_uid}`
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<tr
|
<tr
|
||||||
key={value?.file_uid}
|
key={value?.file_uid}
|
||||||
@@ -103,7 +104,7 @@ export default function MyUploadedFiles({ uploadedFiles }) {
|
|||||||
<td className="text-right py-4 px-2">
|
<td className="text-right py-4 px-2">
|
||||||
<div className="flex justify-center items-center">
|
<div className="flex justify-center items-center">
|
||||||
<a
|
<a
|
||||||
href={imageLink}
|
href={downloadLink}
|
||||||
title="download"
|
title="download"
|
||||||
// className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
// className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -443,6 +443,7 @@ export default function UploadProduct({uploadTypes}) {
|
|||||||
// to="/"
|
// to="/"
|
||||||
onClick={uploadItem}
|
onClick={uploadItem}
|
||||||
className="sm:w-[126px] h-[46px] w-[100px] flex justify-center items-center btn-gradient sm:text-18 text-sm rounded-full text-white"
|
className="sm:w-[126px] h-[46px] w-[100px] flex justify-center items-center btn-gradient sm:text-18 text-sm rounded-full text-white"
|
||||||
|
disabled={uploadTypes.loading || requestStatus.loading}
|
||||||
>
|
>
|
||||||
Upload
|
Upload
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user