dimer47 / node-ovh-objectstorage

Creative Commons Attribution Share Alike 4.0 International
12 stars 11 forks source link

getTempLink for object not created yet #27

Open jf-gl opened 2 years ago

jf-gl commented 2 years ago

Hi,

I need to create a temporary link to an object not created but the function getTempLink check if the object exist. The idea is to alert and give a temporary link to a user during the object is uploaded to object storage. I tried to create a temporary link on object not created on OVH object storage using swift command and it works. Could you delete the object exist check of the getTempLink function ?

Best regards.

dimer47 commented 2 years ago

Hi @jf-gl,

You can already deactivate this security by modifying the value of check_exists: false in the options of the library. See https://github.com/dimer47/node-ovh-objectstorage#-examples-

Then I do not recommend this solution, I will rather favor an FSLock type solution (filesystem lock) by creating an empty file (0 KB) or you can generate a sharing link and finally you update the file as soon as its content is available.

Regards