Reputation: 12945
I am trying to use the filepicker.io widget. I would like to save the event.fbfile.url in a mysql database. Would i use a .get with jquery to save the image url? Code examples would be helpful. Thank you for your help. Below is the code widget.
<input name="img" data-fp-class="form-simple-action-btn filepicker_launcher" data-fp-button-text="Choose Image" data-fp-services="COMPUTER,FACEBOOK,FLICKR,INSTAGRAM,PICASA" data-fp-container="modal" data-fp-mimetypes="image/*" type="filepicker" data-fp-apikey="AmKDQg1vZRBatEqkUY6Qxz" data-onchange="console.log(event.fpfile.url)" id='campaign-img-input'">
Upvotes: 0
Views: 392
Reputation: 8051
You'll need some server side code to write to your database.
If this is part of an html form, the url will appear in the form when submitted and you can save it to your db just like any other part of your form.
If this is not part of a form, you can probably set up a simple server side endpoint that you can do an ajax post to and that when you post data to the endpoint, it will save the data into your mysql.
If you provide more detail about how your system is set up and how you are currently writing to your database, I can probably be more helpful.
Upvotes: 1