tango-app-api-store-builder 1.0.0-beta-33 → 1.0.0-beta-34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-store-builder",
3
- "version": "1.0.0-beta-33",
3
+ "version": "1.0.0-beta-34",
4
4
  "description": "storeBuilder",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -254,7 +254,7 @@ export async function uploadImage( req, res ) {
254
254
 
255
255
  let params = {
256
256
  Bucket: JSON.parse( process.env.BUCKET ).storeBuilder,
257
- Key: `${req.body.taskId}/${req.body.qno}/${dayjs().format()}`,
257
+ Key: `${req.body.taskId}/${req.body.qno}/${Date.now()}/`,
258
258
  fileName: req.files.file.name,
259
259
  ContentType: req.files.file.mimeType,
260
260
  body: req.files.file.data,
@@ -304,7 +304,8 @@ export async function updateAnswers( req, res ) {
304
304
 
305
305
  req.body.answers.forEach( ( ans ) => {
306
306
  if ( ans.image && ans.image.includes( 'http' ) ) {
307
- ans.image = url.split( '.com/' )[1].split( '?' )[0];
307
+ ans.image = ans.image.split( '.com/' )[1].split( '?' )[0];
308
+ ans.image = decodeURIComponent( ans.image );
308
309
  }
309
310
  } );
310
311