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

uploadFile seems to be too slow #43

Closed
bernardodestefano opened this issue Dec 9, 2019 · 5 comments
Closed

uploadFile seems to be too slow #43

bernardodestefano opened this issue Dec 9, 2019 · 5 comments

Comments

@bernardodestefano
Copy link

bernardodestefano commented Dec 9, 2019

Hello there,
i'm trying to upload some assets saved in a mongodb collection to bynder using the js-sdk.
For some reason each and every successful call takes 15 seconds to conclude which seems to be very strange. Is this expected?

I have the following code:

uploadFile({
            filename: `SMCR_UGC_${submission.fileId}`,
            length: submission.fileSizeInBytes,
            body: fileStream,
            data: {
              brandId: submission.brandId,
              name: `SMCR_UGC_${submission.fileId}`,
              description: submission.description,
              ...languageMetaProperty,
              ...destinationMetaProperty,
              ...fileTypeMetaProperty,
              ...subFileTypeMetaProperty,
            },
})```
@danielsequeira
Copy link
Contributor

Hi @bernardodestefano,

Yes unfortunately, our average to upload a file through our API is around 10 ~ 15 seconds. Of course this value varies, but it will always depend in a lot of factors, like how many uploads we are processing/converting at the moment, etc. If you are performing a mass upload in case it is possible I would recommend that you schedule it for after work hours, during the evening or even during the night.

Besides that can I ask you which values are you passing in the following variables:

...languageMetaProperty,
...destinationMetaProperty,
...fileTypeMetaProperty,
...subFileTypeMetaProperty,

I'm wondering if you might be passing some invalid data.

@bernardodestefano
Copy link
Author

Hi @danielsequeira

languageMetaProperty['metaproperty.2023AAF3-7E00-4CAD-8E41D3835E496D68'] = '01E2253C-1888-4A38-90BDC140CBE7B5C8'

destinationMetaProperty['metaproperty.2009DAC5-52F9-4967-B1F689E2E1D57D0A'] = 'ed8dd2e6-b903-4876-b5f09954cbf84c19'

fileTypeMetaProperty['metaproperty.4AD1F80E-A6FB-4113-B4A1C606C88C6CDA'] =
        '19F6C6F0-E19F-4FF8-8763AE402727A5DA'

subFileTypeMetaProperty[
        `metaproperty.B7A06778-4EE5-4161-BDDBBFA5E60C3855`
      ] =
        'D7518778-3A79-4F94-8CDF34A654DE4615,19F6C6F0-E19F-4FF8-8763AE402727A5DA,8CD75CB3-21EC-448D-9259DD127786D686';

@danielsequeira
Copy link
Contributor

Hi @bernardodestefano,

That looks fine. Besides the fact that this id ed8dd2e6-b903-4876-b5f09954cbf84c19 is not in the CFUUID format.

@bernardodestefano
Copy link
Author

image

Hi @danielsequeira that's the UID i got from the specific destination (Oxford) coming from bynder.getMetaProperties()

@danielsequeira
Copy link
Contributor

true, but I'm wondering if passing the characters in lower case will still work as expected

@elseee elseee closed this as completed Jan 12, 2022
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

No branches or pull requests

3 participants