1 Answer
1

Update:

The uploader is fixed now! We had to turn it into a full Mathematica application in order to adapt to the changed SE API. The new version and installation instructions can be found in the SEUploaderApplication repository of halirutan. If you are not able to install it through the provided installation script, please download the complete repository, unpack it and copy the SEUploader folder (with all its content) into

FileNameJoin[{$UserAddOnsDirectory, "Applications"}]

After a restart of Mathematica, the "SE Uploader" should show up in the "Palettes" menu. If you still have problems, leave a @halirutan comment here stating your operating system, Mathematica version and the occurring error. --halirutan

25. November 2013

StackExchange has changed the upload API. I have adapted the image uploader to work with the new API. Please follow the instructions on the SEUploaderApplication repository. --halirutan

Original Post

This is my implementation (with contributions from @halirutan and help from a number of people) of an image uploader palette, which I would like to share with the community to make it more convenient to use this site.

USAGE:

When correctly installed, you should see a palette like this:

To upload, just select a graphics (or any other part of the notebook), and press the "Upload to SE" button to get a preview before uploading:

On Windows there are two buttons: "Upload to SE" and "Upload to SE (pp)". The "pp" (pixel perfect) one will rasterize the selected notebook element exactly the same way you see it in the notebook. Unfortunately I haven't (yet) been able to make this work on platforms other than Windows. The "Upload to SE" button will reformat everything to a width of 650 pixels and will discard any style/magnification information.

You can also see the history using the "History..." button. This will show you your recent uploads and you can click on an existing image to copy its URL or clear the history.

To update, simply use the Update... button. If there is an update available, this button will turn pink. The palette automatically checks for updates every few days (if it is open).

There are a few problems that have happened to people, but I am not able to reproduce them. If you can come up with a way to reproduce any of these, please contact me!

Sometimes none of the palette buttons do anything. Pressing Update or History will not bring up a new window either.

If this happens to you, close the palette and re-open it from the Palettes menu. If that doesn't fix the problem, then open the palette, evaluate SEUploader`checkOnlineVersion[], then close and re-open the palette.

Sometimes no palette buttons show at all, just the Mathematica.SE logo on the left. If you can reproduce this, please contact me.

The thumbnails of old uploads (upload history) may get corrupted for reasons unknown to me. The symptom is an error or hang when you press the History button or an error every time you try to upload. To fix this, first try clearing the history in the History... dialog. If the front end hangs when you try to open the History window, clear the history as follows:

Close the palette and restart the Front End

Identify the file name of the palette. It's found here: SystemOpen@FileNameJoin[{$UserBaseDirectory, "SystemFiles", "FrontEnd", "Palettes"}]. Let's call it SE Uploader.nb.

Evaluate CurrentValue[$FrontEnd, {"PalettesMenuSettings", "SE Uploader.nb", TaggingRules}] = {} and restart the front end. Make sure you use the correct file name for your system in place of SE Uploader.nb. Only use the file name, not the full path. Alternatively this front end option can be cleared using Format -> Option Inspector after selecting Global Preferences in the top left dropdown.

Restart the Front End again, open the palette and check that the History... button brings up an empty window. If the problem was due to corrupted history entries, it should be fixed now.

When running in HiDPI mode on OS X, there may be a thin line on the right edge of uploaded images.

UNINSTALLING

If you used the suggested method to install the palette, the following will remove it completely and clear all settings. This is useful if you are having problems with the palette and want to try reinstalling it.

Works marvellously, thanks for all the hard work!
–
István ZacharOct 1 '13 at 18:50

1

I have a problem win Windows 8.1 64 and Mathematica 9 or 10. I receive the message "PrependTo::normal: Nonatomic expression expected at position 1 in PrependTo[CurrentValue[SEUploaderPrivatepnb, {TaggingRules, ImageUploadHistory }],..." after the image has been uploaded...
–
unlikelyJul 18 '14 at 11:44

Since Mathematica 10.0.1 it stopped working for me (Win7 Pro 64 SP1). It hangs Mathematica and needs restart. I tried removing and installing again, same problem.
–
rhermansOct 12 '14 at 15:35

Mathematica is a registered trademark of Wolfram Research, Inc. While the mark is used herein with the limited permission of Wolfram Research, Stack Exchange and this site disclaim all affiliation therewith.