It is troublesome to upload some files to Stack exchange. A possibility is to give some Google Drive or Dropbox URL but it maybe unaccessible to some people. Using the SE Uploader gives some error information like the following:

This results in the add-on not being usable in China or other places with firewalls.

Using Databin is very very slow and limits your file size.


Is there a good method to share files in Stack Exchange?


2 Answers 2


Thank for the J.M.'s and SqRoots' help in this post,I make a function to do this,one can use it encrypt any express in a URL.Now you just share your URL to another:

ShareAny[expr_] := 
 Module[{list, imageWidth, imageHeight, n}, 
  list = ToCharacterCode[Compress[expr]];
    imageHeight} = {If[(n = Ceiling[Sqrt[Length[list]/3]])*(n - 1) > 
      Length[list]/3, n - 1, n], n};
    The following expression to share is in your clipboard., 11, 
    Red]]; (CopyToClipboard@#; #) &[
      Flatten@*(ImageData[#, "Byte"] &)@*Import][
      URLFetch["https://sm.ms/api/upload", Method -> "POST", 
       "MultipartElements" -> {{"smfile\"; filename=\"tmp.png", 
           "image/png"} -> 
           Image[ArrayReshape[list, {imageWidth, imageHeight, 3}], 
            "Byte"], "PNG"]}], "RawJSON"]["data", "url"]]]]

There is a example,you can cope with any expression,such as List,Image,Graph or other local file, like following

list = Range[10^5];

  • You can merge the extraction of an Association[] entry as ["data", "url"] instead of ["data"]["url"]. Commented Oct 15, 2016 at 9:25
  • @J.M. Thanks :)
    – yode
    Commented Oct 15, 2016 at 9:26
  • Why not to use imgur.com which is associated with StackExchange? Commented Oct 15, 2016 at 11:36
  • 1
    @Alexey, the OP complains about imgur being inaccessible from behind the Great Firewall unless a VPN is used. Commented Oct 15, 2016 at 11:45
  • @J.M. Thanks, never thought that this may be the case. It is not completely clear from the question though. Commented Oct 15, 2016 at 11:56
  • Yes, hopefully he'll edit his question to say this, @Alexey. Commented Oct 15, 2016 at 11:57
  • @J.M. I'll research imgur.
    – yode
    Commented Oct 15, 2016 at 13:05
  • @J.M. When I try to call the Imgur API,it will give me a response like "Imgur is temporarily over capacity. Please try again later."Would you be like this?
    – yode
    Commented Oct 21, 2016 at 9:26
  • @AlexeyPopkov Can you call the imgur-API?It cost my some time but fail to make it.This is my code.Help please.
    – yode
    Commented Feb 10, 2017 at 19:57
  • @yode I have no experience with this API but it seems you've already got the answer: chat.stackexchange.com/transcript/message/35358667#35358667 Commented Feb 11, 2017 at 5:02
  • I am a little confused. To what extent imgur is blocked by GFW? Why can you see pictures from imgur on SE, while a direct access is impossible?
    – vapor
    Commented Apr 5, 2017 at 14:22
  • @happyfish "http://stackoverflow.com/upload/image" is a extra port for StackEchange,but not a opening API,I think.
    – yode
    Commented Apr 5, 2017 at 14:24
  • I guess that upload API just acts like a web proxy. But I meant the images you can see on SE, they should be hosted directly by imgur, wouldn't that imply imgur is not blocked?
    – vapor
    Commented Apr 5, 2017 at 14:26
  • @happyfish No,imgur is not blocked,they just forbid their API is called by Chinese mainland user.
    – yode
    Commented Apr 5, 2017 at 14:29
  • Perhaps we need a special toolkit for Chinese users. I remember having trouble logging in without VPN.
    – vapor
    Commented Apr 5, 2017 at 14:45

You can store limited amounts of data as QR images as I used here:


You don't need to scan them; the data can be retrieved from the image URL.

  • As the documentatation,the character limited size seem too small?
    – yode
    Commented Oct 15, 2016 at 19:39
  • Yes, it's limited. In the example linked, I tried putting the dates and two data sets in one QR file but it was too big, so I split it. Commented Oct 15, 2016 at 19:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .