I just found Fine Uploader today, after having searched for a javascript uploader that will also support posting the file to Amazon S3. I read the documents as much as I could and searched this site, but I don't think there's anything about this specifically.
As a user of wikis and Markdown (it's ubiquitous, here, on github, in our internal ERP database and so on), I'd like to be able to easy copy-paste a "syntax complete" string, after a file is uploaded, because that would really make documentation creation easier.
The workflow I envision -
Then I can paste the result into whatever textarea I want. Something like:
![This is image 1](http://mys3_url.tdl/path/to/this_is_image_1.png)
![This is image 2](http://mys3_url.tdl/path/to/this_is_image_2.png)
[Link to a PDF](http://mys3_url.tdl/path/to/this_is_my_pdf_1.pdf))
For bonus points, I'd like to add an icon to represent the non-image file type, to its left. Something like:
![](http://url.tdl/path/to/icon.png)[Link to a PDF](http://mys3_url.tdl/path/to/this_is_my_pdf_1.pdf))
I imagine there's a way to do this, with a cursory look at the Events and API methods. But would you be so kind as to point me at events or API methods of interest?
Please advise. If this is the wrong place for this and if it needs to be posted at your github, I will do so. Let me know, please.
Thank you for your assistance in advance.
Kind regards
Rick
It sounds like you are simply looking for a way to easily retrieve the url in S3 of each uploaded file. This can be done by having your server return the URL of the file in the response to the upload success POST request sent by Fine Uploader. Fine Uploader will return the response (assumed to be JSON) to your onComplete
event handler.
For example, say your server returns the following response to an upload success POST: {"url": "http://mys3_url.tdl/path/to/this_is_image_1.png"}
. You can access this response in your onComplete
event handler like this:
var uploader = new qq.s3.FineUploader({
...
callbacks: {
onComplete: function(id, name, responseJSON) {
var urlOfFile = responseJSON.url;
...
}
}
});
At this point, you can so whatever you please with these URLs.