-
Notifications
You must be signed in to change notification settings - Fork 2
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
base: main
Are you sure you want to change the base?
Opensea viewer #43
Conversation
Changes done:
|
@@ -110,6 +110,7 @@ function Viewer(props) { | |||
const formData = new FormData(); | |||
setDisplayProgressBar(true); | |||
formData.append('file', file); | |||
console.warn('file__', file); |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uncomment this
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, | ||
); | ||
}); | ||
|
There was a problem hiding this comment.
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
childProcess1.stderr.on('data', err => { | ||
console.error('Error:', err.toString()); | ||
}); |
There was a problem hiding this comment.
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}`}
No description provided.