0

I'm working on a sencha touch app and I have a form whose need load an jpeg/image and required some headers in the request headers. Simply it can't be load at traditional way, or I get a 403 (forbidden) error.

I try many ways but without success so I think that ajax is the solution. Ajax can load binary data?

Somebody knows if it's possible do that?

Or is it just impossible and I must do it in another way?

Thanks

khr055
  • 28,690
  • 16
  • 36
  • 48
David V
  • 11
  • 2
  • Have you found solution to this issue? I have the exact problem. URL of the image, i'm trying to load is in store, and i'm trying to load it in itemTpl. `code` itemTpl: , `code` And i always get 403 forbidden. I also noticed in RequestHeader that Referer is set to 'http://10.20.30.43/nezavisne/'. Maybe that is the issue, because when loading image via browser Referer is not set. – bajicdusko May 17 '12 at 12:33

1 Answers1

1

I believe that this stackoverflow thread might be of help: Set a request header in JavaScript

Anyway, please consider using the setRequestHeader method. Check under section 4.7.2 on http://www.w3.org/TR/XMLHttpRequest/

Community
  • 1
  • 1
Israfil Havilah
  • 755
  • 9
  • 15