How to Validate File Name to Upload to Box from Salesforce
Hello,
I currently have the Box app installed on Salesforce. The file upload works with both standard and custom objects. However, I would like to add file name validation. How may I go about doing this? Any help would be greatly appreciated.
Sincerely,
Anon
-
Perhaps I should add more information?
Should I use:
- JWT with SDK
- JWT with API
- OAuthentication 2.0
- Dev Token
?
(Although, it looks like the documentation mentions that Dev Tokens are more for testing purposes. Please correct me if I am mistaken.)
Which approach would be recommended? Any assistance would be greatly appreciated.
-
Hello,
Thanks so much for the clarification!
You will need to write some logic to check the file name before making the API call to box. Box doesn’t care about file names as long as there’s no conflicting file name in the same directory and that the characters used are valid. For example, if you want all file names to be “# account_name date” (where # is a number and date is a date in a specific format), you need to write that logic yourself and have a way to notify the user that they need to rename the file. Unfortunately, we won't be able to provide guidance on what that specific logic should look like.
Best,
Kourtney
-
Hello,
Choosing to use an SDK or not is completely up to you and your personal preference! If you are new to using the Box API and are familiar with our of the programming languages we offer an SDK for, I would definitely suggest using one to guide you.
As for whether to use standard oauth2 or JWT, that's dependant on your use case. I would recommend taking a look at the comparison chart on this page and dig a little deeper into our documentation on each to decide which is going to provide what you need!
Best,
Kourtney
サインインしてコメントを残してください。
コメント
6件のコメント