سؤال

We have an internal application that owns the folders for a given topic; topic subscribers are added as collaborators via the api. When a message to the topic contains an attachment, we upload it to the folder, where is can be accessed by the topic subscribers via a link we show in the rendered message.

The problem we have is partially an organizational issue:

  • Our users are restricted to shared links of a maximum time frame
  • This application uses a generic account from which it shares out these files, but there's no way to exclude it from the policy of shared links expiration

Our idea was to get the file url (eg. https://acme.app.box.com/files/0/f/689840703/1/f_17027007623 ) and display that link instead of a shared collaboration. It's not obvious from the documentation how to do so ...

هل كانت مفيدة؟

المحلول

Assuming the URL format doesn't change, you can template it as:

https://acme.app.box.com/files/0/f/$FolderId/1/f_$FileId

$FolderId is already known to you because you're programmatically uploading files to that folder.

$FileId can be derived from the File object that's returned to you as a result of the upload.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top