I want to upload a image(UIImage) from ios app to django website.(where has forms and submit button, just like normal web page.)
So I decide to use ASIFormDataRequest for that. (I’m a noob, am I doing right?)
First,
NSURL *url = [NSURL URLWithString:@"http://someec2site/profile/album/2/upload/"];
Error: The current URL, profile/album/2/upload/, didn’t match any of these.
So, I did,
NSURL *url = [NSURL URLWithString:@"http://someec2site/profile/albums/(?P<album_id>\d+)/upload/"];
ERROR: Unknown escape sequence ‘\d’
I have a question.
1) Am I doing right?
2) How can I grab a relative url for string? (redirecting urls based on url.py)
First of all Your choice of using ASI is very good for HTTP requests.
If I am not mistaken you are trying to construct the upload urls for different album ids.
Why don’t you try this: