Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opensea viewer #43

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Opensea viewer #43

wants to merge 7 commits into from

Conversation

UmangSharma5
Copy link
Owner

No description provided.

@shaantanu314
Copy link
Collaborator

Changes done:

  • Related to height/width

@@ -110,6 +110,7 @@ function Viewer(props) {
const formData = new FormData();
setDisplayProgressBar(true);
formData.append('file', file);
console.warn('file__', file);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

@@ -228,8 +230,8 @@ router.post('/:url', async function (req, res) {
// count = 0;
const form = formidable({
multiples: false,
maxTotalFileSize: 2000 * 1024 * 1024,
maxFileSize: 2000 * 1024 * 1024,
maxTotalFileSize: 10000 * 1024 * 1024,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to config

@@ -35,6 +35,7 @@ app.use('/hv/link', require_auth_proxylinks, proxyLinks);
// app.use('/hv/getURL',getURL);
// app.use('/hv/deleteBucket',deleteBucket);
// app.use('/hv/deleteObject',deleteObject);
// app.use('/hv/link', proxyLinks);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uncomment this

Comment on lines +296 to +326
const command1 = `vipsheader`;
const args1 = [`${filePath}`];

const childProcess1 = spawn(command1, args1);

childProcess1.stdout.on('data', data => {
const output = data.toString();
const dimensions = output.match(/(\d+)x(\d+)/);
if (dimensions) {
width = parseInt(dimensions[1]);
height = parseInt(dimensions[2]);
}
console.warn(width, height);
});

childProcess1.stderr.on('data', err => {
console.error('Error:', err.toString());
});

childProcess1.on('close', async () => {
await map_file_type(
user,
fileId,
bucketName,
tempName,
parts[1],
width,
height,
);
});

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comment to explain the usage

Comment on lines +311 to +313
childProcess1.stderr.on('data', err => {
console.error('Error:', err.toString());
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

throw new Error(`Vips header : ${err.message}`}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants