This forum is intended for MultCloud Support Discussion.
[SUGGESTION] Handling Shared Links in Box and other cloud providers
Currently we are able to add URLs to the URL uploader, which is great, but there's work to do if you're adding from someone else's shared file(s).
When cloud services create public (or semi-restricted) links for files they either obfuscate with a webpage, or use a URL argument.
I propose that you have a "Shared Links" option in the URL Uploader window. Simply put the user pastes in a URL, and then multcloud uploads it to wherever they indicate on their many drives.
But there are different ways that the big cloud companies get you to the file you need ... so I thought I'd assist this suggestion with my research into the subject:
https://drive.google.com/file/d/sdlkvbnsdklfgbsdkfjgb_d8f7g6d9fyghk43j5h/view
The long mashed bit is the ID (that's true of folders, too), and to download that file the URL needs to be:
https://drive.google.com/u/0/uc?id=sdlkvbnsdklfgbsdkfjgb_d8f7g6d9fyghk43j5h&export=download
So you guys can now use that in URL conversion on your end and we can take shared links from Google just by pasting the URL in a field on your site!
Right. Here they put the detail in the webpage (wetransfer bit here), which is obviously more complicated than a URL change. I've only been able to figure out BOX, because it looks like wetransfer is doing some token stuff that isn't quite easily parsed on a quick glance basis.
But how do we get values of INSERTSHAREDNAME and INSERTFILEID? Well, you need to parse the webpage that they give you, and in there it provides the information that you need in this bit of HTML (and JSON!) code:
So if you:
I'm testing this right now in Power Automate (paid) and having good results! Although because that's a nocode environment that is picky with data, I had to just split the text a few times, which isn't as elegant.
I hope this information will help you if you decide to integrate some of these ideas as part of this suggestion. I do think it'll make people's lives much, much, easier, when they're handling shared links.
When cloud services create public (or semi-restricted) links for files they either obfuscate with a webpage, or use a URL argument.
I propose that you have a "Shared Links" option in the URL Uploader window. Simply put the user pastes in a URL, and then multcloud uploads it to wherever they indicate on their many drives.
But there are different ways that the big cloud companies get you to the file you need ... so I thought I'd assist this suggestion with my research into the subject:
URL Changers - Google and DropBox
So I'll provide a couple of examples of stuff you could use with URLs of publicly Shared Links from the "big two".Google Drive
Here is a Google Drive link (made up!):https://drive.google.com/file/d/sdlkvbnsdklfgbsdkfjgb_d8f7g6d9fyghk43j5h/view
The long mashed bit is the ID (that's true of folders, too), and to download that file the URL needs to be:
https://drive.google.com/u/0/uc?id=sdlkvbnsdklfgbsdkfjgb_d8f7g6d9fyghk43j5h&export=download
So you guys can now use that in URL conversion on your end and we can take shared links from Google just by pasting the URL in a field on your site!
Dropbox
For a Dropbox URL it is even easier, here is your sample URL (I won't bother with fake details):[URL]?DL=0<br>Because the important thing on a Dropbox URL is that DL= part. It's quite simple, a 0 means that you're viewing the file, and a 1 means download it. This also works for folders (and Dropbox will automatically zip the folder). So we change that DL=0 to:
[URL]?DL=1<br>Now the dropbox file will download! Easy win number two for multcloud!!
Direct Link Obfuscators - BOX and wetransfer
What about these guys? They play hardball, right?Right. Here they put the detail in the webpage (wetransfer bit here), which is obviously more complicated than a URL change. I've only been able to figure out BOX, because it looks like wetransfer is doing some token stuff that isn't quite easily parsed on a quick glance basis.
BOX
So, let's take Box, as our example (something I've lodged in the help, actually! ) ... Well, after months and months of digging I have finally found the following URL structure gives you a direct link to a file:https://app.box.com/index.php?rm=box_download_shared_file&shared_name=INSERTSHAREDNAME&file_id=f_INSERTFILEID<br>AMAZING!
But how do we get values of INSERTSHAREDNAME and INSERTFILEID? Well, you need to parse the webpage that they give you, and in there it provides the information that you need in this bit of HTML (and JSON!) code:
{"sharedName":"xayylsdly54bei0apcx66f7natx05ie4","vanityName":"","itemID":694850359063,"itemType":"file"}<br>They've kindly put it into JSON already so you can process it easier.
So if you:
- Perform an HTTP GET on a BOX link.
- Parse the HTML for the above.
- Select the sharedName and itemID and make a URL with them.
I'm testing this right now in Power Automate (paid) and having good results! Although because that's a nocode environment that is picky with data, I had to just split the text a few times, which isn't as elegant.
Conclusion
I hope this information will help you if you decide to integrate some of these ideas as part of this suggestion. I do think it'll make people's lives much, much, easier, when they're handling shared links.
Tagged:
Comments
I'm Simon from MultCloud DEV team.
Thank you so much for the suggestion and your suggestion proves to be quite helpful!
We're actually working on our remote upload feature and we'll support uploading shared file on some of most common cloud services this year.
As your suggestion proves to be really helpful for us, we have already upgraded your MultCloud account with 1-year unlimited cloud-to-cloud tranffic.
That's great news ... thank you so much! :-)
If I'm truly honest I was just happy to help. I know that Shared Links are a huge part of business' online cloud operations, but the key isn't the creation and maintainance of those, it's for the people at the other end being able to use them ... and that's not always easy to do, programmatically.
I had also started to look at the BOX API which does actually allow for key/token generation which simplifies a lot of this.
Anyway ... Glad you're on to this, and really appreciate the bandwidth. I promise I won't abuse it ... much! ;-)
Thank you so much for supporting MultCloud. If you have any other questions or suggestions, please feel free to contact us back, we will be very appreciated.
I know that some of these APIs are troublesome (especially WeTransfer ... I bet you're not so fond of them XD ...) ... but having access to Shared Link folders at places like DropBox, Box, and suchlike, would be immense.