Image Upload
Posted: Mon Jun 04, 2018 2:21 am
Hello everybody,
In my mobile application, i got a card which is like a sign up card ~ In this card, user need to input details and when they press the sign up button , the details will be sent to my own website. In this card, there is a username , password and image data to be submit to my website.
The username and password can be submitted but image can't be submit anybody know how i can make the image data to be sent??
The button for user to input image
[The button to signup code]
In my mobile application, i got a card which is like a sign up card ~ In this card, user need to input details and when they press the sign up button , the details will be sent to my own website. In this card, there is a username , password and image data to be submit to my website.
The username and password can be submitted but image can't be submit anybody know how i can make the image data to be sent??
The button for user to input image
Code: Select all
on mousedown
create image "profilepicture"
put "*.jpg;*.gif;*.png" into types
if there is not an image "profilepicture" then
answer "please insert image"
end if
answer file "Select file" with type types
if it is empty then exit mousedown
put it into fn
if there is a file fn then
set the fileName of image "profilepicture" to fn
else
answer "please insert image"
end if
end mousedown
[The button to signup code]
Code: Select all
answer "Are you sure you want to signup?" with "No" and "Yes"
if it is "Yes" then
put field "username" into username
put field "password" into password
put image "profilepicture" into profilepicture
put "username="&username&" && password="&password&" && image="&profilepicture&"" into myData
post myData to URL "https://example.com/signup""
answer "Submited Successfully!"
go to card "logincard"
end if
end mouseup