3
0
mirror of https://github.com/Qortal/q-tube.git synced 2025-02-11 17:55:51 +00:00

Metadata for publishes is now a file instead of Base64.

.eslintrc renamed to cjs to fix error when using ESLint

Max file size is now global variable that coverts file size to binary byte format automatically.

Many small EsLint fixes.

Fixed no key warning in MultiplePublishAll.tsx
This commit is contained in:
Qortal Dev 2024-06-24 11:34:31 -06:00
parent 0001ea250a
commit 728437ea97
4 changed files with 3 additions and 6 deletions

View File

@ -318,7 +318,6 @@ export const EditVideo = () => {
tag1: QTUBE_VIDEO_BASE,
filename: `${alphanumericString.trim()}.${fileExtension}`,
};
console.log('edit file is: ', file)
listOfPublishes.push(requestBodyVideo);
}

View File

@ -78,7 +78,7 @@ export const MultiplePublish = ({
);
const retry = () => {
let newlistOfMultiplePublishes: any[] = [];
const newlistOfMultiplePublishes: any[] = [];
listOfUnsuccessfulPublishes?.forEach(item => {
const findPub = publishes?.resources.find(
(res: any) => res?.identifier === item.identifier

View File

@ -146,7 +146,6 @@ export const PublishVideo = ({ editId, editContent }: NewCrowdfundProps) => {
maxSize,
onDrop: (acceptedFiles, rejectedFiles) => {
const formatArray = acceptedFiles.map(item => {
console.log('file: ', item)
let filteredTitle = "";
if (isCheckTitleByFile) {
@ -288,7 +287,6 @@ export const PublishVideo = ({ editId, editContent }: NewCrowdfundProps) => {
/[^a-zA-Z0-9_]/g,
""
);
console.log('file size: ', file.size)
const videoObject: any = {
title,
version: 1,

View File

@ -51,9 +51,9 @@ export function objectToFile(obj: any) {
const jsonString = JSON.stringify(obj)
// Step 2: Create a Blob from the JSON string
const blob = new Blob([jsonString], { type: 'application/json' })
return blob
return new Blob([jsonString], { type: 'application/json' })
}
export function objectToUint8Array(obj: any) {
// Convert the object to a JSON string
const jsonString = JSON.stringify(obj)