Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by knotz · May 30, 2017 at 06:15 AM · databaseuploadexternal files

Upload files to a database

I'm making an app that requires to upload a file, for example, a pdf file to a database, I'v read you can upload data from de game to a database, is it possible to do this with an external file?

Comment
Add comment
10 |3000 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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Maximetinu · Jun 04, 2017 at 12:25 AM

Unity is able to handle files uploads.

In the Scripting API for WWWForm there is an example about how to send a png file by POST to a given URL. By doing this, you also must to program, for example, a php script to receive the file and upload it to the database.

You also should check the Scripting API for WWW class because both classes work together.


Anyway, I tell you that to do this in a professional manner you also need to know how to coding a secure web script using hashes and some Apache config files to block accesses from browsers, for example. It should be enough programming a MD5 test like it's done in this tutorial

Lastly, let me give you the link of two of my GitHub repos that work together, as one is a Unity Game and the other a web that stores his highscores:

  • No-Mans-Flappy-Unity. Check how the WWW scripts work, in the folder Assets/Scripts/WWW.

  • No-Mans-Flappy-web. Check the php/game-scripts folder, as there are all the URL's that will be accessed by the WWW scripts.

That's all. Now you have all the needed tools to learn how to upload a file to a database. Happy coding!

Comment
Add comment · Share
10 |3000 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
0

Answer by lefinno · Jun 03, 2017 at 11:30 AM

i suggest you to write an app using any jdk or ios developement kit, cus unity is kind of a game engine, and its main purpose is for games, so, it won't provide much convenient and features for writing an app.

Comment
Add comment · Show 1 · Share
10 |3000 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 lefinno · May 30, 2017 at 06:28 AM 0
Share

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

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.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Adding Score & Level to Database / Dreamlo 1 Answer

UnityWebRequest how to upload a file/gameobject 0 Answers

Downsize/compress image on upload to Firebase? 0 Answers

Uploading a game (problems) -1 Answers

publish to App Store BINARY to iTunes connect ? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges