Features
Games
Add-ons
Docs
Pricing
Forums
Blog
Log in
Sign Up

Features

Games

Add-ons

Docs

Pricing

Support

Blog

Log in

Sign Up

  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Ideas
    • Articles
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by andrem · Jan 08, 2017 at 07:48 PM ·

Corona SDK - Content Download Thru CDN not working.

Hi Guys,

I think there may be an issue with the content download on Corona SDK.

Whenever I set ThruCDN to false, I can download files, but as soon as I set ThruCDN to true when downlaoding the file I get an error message on the console telling me "Invalid Parameter: URL argument was malformed URL"

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Jan 08, 2017 at 10:06 PM

The results should be the same as if you called GetContentDownloadUrl any other way. Can you try getting the download URL by making the call in Postman, and see if that URL works for you? If not, can you describe specifically how you're making the download call itself, and what the info is for the file (Title ID and Key for the file)?

Comment

People who like this

0 Show 3 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image andrem · Jan 09, 2017 at 12:09 AM 0
Share
Hi,

I'm not really sure how to make the call in Postman. I am not quite skilled in this field.

This is how my code looks like. How can I do the call in Postman?

-- ACTUAL DOWNLOAD
local function actualDownload( result )
	local params = {}
	print(result.URL)
	network.download(
		result.URL,
		"GET",
		onComplete,
		params,
		pathEditorZip,
		system.DocumentsDirectory
	)
end
		
-- GET DOWNLOAD URL
local downloadRequest = {
	Key = pathCloud,
	HttpMethod = "GET",
	ThruCDN = true
}
PlayFabClientApi.GetContentDownloadUrl(downloadRequest, actualDownload,
	function(error)
		print(" Failed DOWNLOAD URL: " .. error.errorMessage)
	end
)

avatar image Brendan ♦♦ andrem · Jan 09, 2017 at 10:16 PM 0
Share

Postman is a tool that lets you make Web API calls quickly and easily, to test out functionality: https://www.getpostman.com/.

We also provide a complete Postman Collection for all PlayFab API calls: https://github.com/PlayFab/PostmanCollection.

From your code, it actually appears that there isn't a problem with the PlayFab API call (which gets the URL for the download), but rather with the network.download call. Here's what I would recommend:

Get the download URL from our service, whether via your code or Postman, with ThruCDN set to true. Use that to try to download the file directly, using cURL (as described here: https://playfab.com/how-use-playfabs-content-management-api/). If that works, you know that the issue is with the network.download call itself, in which case you'll need to reach our to the Corona team. If that doesn't work, please open a ticket and send us all the details of your test - the specifics of the GetContentDownloadUrl call, as well as the cURL command issued.

avatar image andrem Brendan ♦♦ · Jan 10, 2017 at 10:49 AM 0
Share

Wow, did not know about a tool like this! I am totally putting my hands on it!

I finally was able to find out what the issue was. All our folders at the File Manager had spaces in it. By just replacing with "_" in the name of our folders I was able to fix it.

Thanks a lot for the support :-)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Tickets

    Need help with a confidential issue? We've got your back!

  • Create Ticket
  • View Open Tickets
  • Stay up-to-date with the latest from PlayFab:  
    Sign up for newsletter
    Engineers
    • Documentation
    • Tutorials
    • API Reference
    • SDKs
    • Usage Limits
    PLAYFAB
    • Features
    • Games
    • Add-ons
    • Pricing
    Support
    • Forums
    • Videos
    • File a Ticket
    • Service Health
    • Blog
    About
    • About
    • Jobs
    • Contact
    • Press Room
    • Privacy Policy
    • Terms of Service
    • Acceptable Use
    • Style Guide
     
     
    Sign Up

    ©2017 PlayFab, Inc.

    ©2016 PlayFab, Inc. All rights reserved. PlayFab® is a registered trademark of PlayFab, Inc. | Privacy | Terms | Acceptable Use
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Post an idea
    • Create an article
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Ideas
    • Articles
    • Users
    • Badges